Skip to content

Commit

Permalink
Add NewStringListMapField
Browse files Browse the repository at this point in the history
This way you can attach String Lists as a Map Value.
  • Loading branch information
AndreasBergmeier6176 committed Aug 27, 2024
1 parent 82e275d commit 12a6d5d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/service/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ func NewStringListField(name string) *ConfigField {
}
}

// NewStringListMapField describes a new map type config field consisting of
// lists of strings with one or more child fields.
func NewStringListMapField(name string) *ConfigField {
stringListField := NewStringListField(name)
return &ConfigField{
field: stringListField.field.Map(),
}
}

// NewStringListOfListsField describes a new config field consisting of a list
// of lists of strings (a 2D array of strings).
func NewStringListOfListsField(name string) *ConfigField {
Expand Down

0 comments on commit 12a6d5d

Please sign in to comment.