Skip to content

Commit

Permalink
localize option types (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong authored Jan 28, 2024
1 parent ce5d7a8 commit ae80a16
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
9 changes: 5 additions & 4 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func WithDecodeHook(decodeHook mapstructure.DecodeHookFunc) Option {
}
}

// Option configures a Config with specific options.
type Option func(*options)

type options Config
type (
// Option configures a Config with specific options.
Option func(*options)
options Config
)
9 changes: 5 additions & 4 deletions provider/env/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func WithDelimiter(delimiter string) Option {
}
}

// Option configures an Env with specific options.
type Option func(*options)

type options Env
type (
// Option configures an Env with specific options.
Option func(*options)
options Env
)
9 changes: 5 additions & 4 deletions provider/file/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func IgnoreFileNotExit() Option {
}
}

// Option configures the a File with specific options.
type Option func(options *options)

type options File
type (
// Option configures the a File with specific options.
Option func(options *options)
options File
)
9 changes: 5 additions & 4 deletions provider/flag/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func WithDelimiter(delimiter string) Option {
}
}

// Option configures the a Flag with specific options.
type Option func(*options)

type options Flag
type (
// Option configures the a Flag with specific options.
Option func(*options)
options Flag
)
9 changes: 5 additions & 4 deletions provider/fs/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func IgnoreFileNotExit() Option {
}
}

// Option configures the a FS with specific options.
type Option func(file *options)

type options FS
type (
// Option configures the a FS with specific options.
Option func(file *options)
options FS
)
9 changes: 5 additions & 4 deletions provider/pflag/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func WithDelimiter(delimiter string) Option {
}
}

// Option configures the a PFlag with specific options.
type Option func(*options)

type options PFlag
type (
// Option configures the a PFlag with specific options.
Option func(*options)
options PFlag
)

0 comments on commit ae80a16

Please sign in to comment.