From 7056e77bf0fcc6fecb1be8f874df7f8ea196c08b Mon Sep 17 00:00:00 2001 From: Chance Date: Tue, 14 May 2024 09:41:29 +0800 Subject: [PATCH] fix: support for missing string type (#270) --- cmd/commands/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/commands/config.go b/cmd/commands/config.go index 82e39d6f..5ec82607 100644 --- a/cmd/commands/config.go +++ b/cmd/commands/config.go @@ -118,6 +118,8 @@ func configSet(v reflect.Value, keys []string, value any) error { } } else { switch v.Field(i).Kind() { + case reflect.String: + v.Field(i).SetString(fmt.Sprintf("%v", value)) case reflect.Bool: value := fmt.Sprintf("%v", value) parseBool, _ := strconv.ParseBool(value)