In a step that I’m working on, I want the user to be able to provide a list of optional YAML key/value pairs for a specific step input, currently trying to implement as:
inputs:
- uri_actions:
- button_text: Some text
uri: www.google.com
- button_text: Some text 2
uri: www.google2.com
- button_text: Some text 3
uri: www.google3.com
and then attempting to parse in Go as structs:
type config struct {
UriActionList []UriAction `env:"uri_actions"`
}
type UriAction struct {
ButtonText string `env:"button_text"`
Uri string `env:"uri"`
}
But this isn’t playing nice at all… what am I doing wrong? Is there a more civilised way to go about this?