Can Kong build a map from a flag? #210
Answered
by
alecthomas
shueybubbles
asked this question in
Q&A
-
eg: Currently I'm using a slice with a custom UnmarshalText ...
Variables []variableInput `short:"v"`
...
type variableInput struct {
name string
value string
}
// UnmarshalText converts x=y string into the name and value
func (v *variableInput) UnmarshalText(text []byte) error { It'd be nice to reuse the existing map building code in Kong |
Beta Was this translation helpful? Give feedback.
Answered by
alecthomas
Sep 15, 2021
Replies: 1 comment 1 reply
-
Yep. It should work exactly as you describe... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shueybubbles
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep. It should work exactly as you describe...