INNER CODE UNIT · Go
func
mweagle/Sparta · aws/step/generator/main.go:54
func (cmp *{{.Name}}) MarshalJSON() ([]byte, error) {
return json.Marshal(&struct {
Variable string
{{.Name}} {{.VariableType}}
}{
Variable: cmp.Variable,
{{.Name}}: cmp.Value,
})
}
`
type choiceRuleVariableDef struct {
Variable string
}
type choiceDefinitions struct {
Choices map[string]choiceRuleVariableDef `json:"choices"`
}