Skip to content

Commit bf6bc0b

Browse files
committed
Update
1 parent e9e34ed commit bf6bc0b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/util/util.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"strconv"
1313
"strings"
1414

15-
"code.gitea.io/gitea/modules/json"
1615
"code.gitea.io/gitea/modules/optional"
1716

1817
"golang.org/x/text/cases"
@@ -283,12 +282,10 @@ func ConfigSectionToMap(in any, keyPrefix string) (map[string]string, error) {
283282
switch v.FieldByName(fi.Name).Kind() {
284283
case reflect.Bool,
285284
reflect.String,
285+
reflect.Slice, reflect.Array,
286286
reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
287287
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
288288
out[fmt.Sprintf("%s.%s", keyPrefix, ToSnakeCase(fi.Name))] = fmt.Sprintf("%v", v.FieldByName(fi.Name).Interface())
289-
case reflect.Slice, reflect.Array:
290-
str, _ := json.Marshal(v.FieldByName(fi.Name))
291-
out[fmt.Sprintf("%s.%s", keyPrefix, ToSnakeCase(fi.Name))] = string(str)
292289
}
293290
}
294291

0 commit comments

Comments
 (0)