Load environment variables as a resolver (#480)

This commit is contained in:
Maxime Vidori
2025-02-09 23:53:27 +01:00
committed by GitHub
parent 6590294c3d
commit 3cedc44821
3 changed files with 69 additions and 15 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func New(grammar any, options ...Option) (*Kong, error) {
},
}
options = append(options, Bind(k))
options = append(options, Bind(k), Resolvers(EnvResolver()))
for _, option := range options {
if err := option.Apply(k); err != nil {