Support for enum mappings in setters

This commit is contained in:
Phillip Wittrock
2020-02-26 20:13:06 -08:00
parent 573d7b7234
commit cf61a360e0
4 changed files with 266 additions and 4 deletions

View File

@@ -104,6 +104,10 @@ type SetterDefinition struct {
// Count is the number of fields set by this setter.
Count int `yaml:"count,omitempty"`
// EnumValues is a map of possible setter values to actual field values.
// May be used for t-shirt sizing values -- e.g. set cpu to small, medium, large
EnumValues map[string]string `yaml:"enumValues,omitempty"`
}
func (sd SetterDefinition) AddToFile(path string) error {