Add a default-enabled EnvResolver for the env tag.
This commit is contained in:
@@ -52,12 +52,13 @@ type Kong struct {
|
||||
// See the README (https://github.com/alecthomas/kong) for usage instructions.
|
||||
func New(grammar interface{}, options ...Option) (*Kong, error) {
|
||||
k := &Kong{
|
||||
Exit: os.Exit,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
before: map[reflect.Value]HookFunc{},
|
||||
registry: NewRegistry().RegisterDefaults(),
|
||||
help: PrintHelp,
|
||||
Exit: os.Exit,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
before: map[reflect.Value]HookFunc{},
|
||||
registry: NewRegistry().RegisterDefaults(),
|
||||
help: PrintHelp,
|
||||
resolvers: []ResolverFunc{EnvResolver()},
|
||||
}
|
||||
|
||||
for _, option := range options {
|
||||
|
||||
Reference in New Issue
Block a user