We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider this:
my_name := "Alice" your_name := "bob" ctx := kong.Parse(&cli, kong.Vars{ "version": "0.0.1", }, kong.Bind(my_name, your_name), )
func (cmd *BuildCmd) Run(my_name, your_name string, globals *Globals) error { fmt.Println("my_name " + my_name + " your_name: " + your_name) return nil }
and run
; ./main build a my_name bob your_name: bob
This happens because bindings are attached via
kong/callbacks.go
Lines 123 to 125 in 8d238c8
and bindings is a map
bindings
Line 12 in 8d238c8
The text was updated successfully, but these errors were encountered:
This is working as intended. To differentiate between values of the same type you'll need to create a new type:
type MyName string type YourName string kong.Bind(FirstName("Alice"), YourName("Bob"))
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Consider this:
and run
This happens because bindings are attached via
kong/callbacks.go
Lines 123 to 125 in 8d238c8
and
bindings
is a mapkong/callbacks.go
Line 12 in 8d238c8
The text was updated successfully, but these errors were encountered: