From 12a6d5ddc18f211f3ec043556b1a044d02e7dd7f Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier Date: Tue, 27 Aug 2024 11:25:48 +0200 Subject: [PATCH] Add NewStringListMapField This way you can attach String Lists as a Map Value. --- public/service/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/service/config.go b/public/service/config.go index 4a8456c3d..939bae022 100644 --- a/public/service/config.go +++ b/public/service/config.go @@ -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 {