Skip to content

Commit 12a6d5d

Browse files
Add NewStringListMapField
This way you can attach String Lists as a Map Value.
1 parent 82e275d commit 12a6d5d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

public/service/config.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ func NewStringListField(name string) *ConfigField {
9595
}
9696
}
9797

98+
// NewStringListMapField describes a new map type config field consisting of
99+
// lists of strings with one or more child fields.
100+
func NewStringListMapField(name string) *ConfigField {
101+
stringListField := NewStringListField(name)
102+
return &ConfigField{
103+
field: stringListField.field.Map(),
104+
}
105+
}
106+
98107
// NewStringListOfListsField describes a new config field consisting of a list
99108
// of lists of strings (a 2D array of strings).
100109
func NewStringListOfListsField(name string) *ConfigField {

0 commit comments

Comments
 (0)