feat(chore): Add tests and use "any" instead of "inteface"
This commit is contained in:
@@ -21,7 +21,7 @@ type chart struct {
|
||||
Values []string
|
||||
}
|
||||
|
||||
func parseValues(prefix string, values map[string]interface{}, result map[string]string) {
|
||||
func parseValues(prefix string, values map[string]any, result map[string]string) {
|
||||
for key, value := range values {
|
||||
path := key
|
||||
if prefix != "" {
|
||||
@@ -29,11 +29,11 @@ func parseValues(prefix string, values map[string]interface{}, result map[string
|
||||
}
|
||||
|
||||
switch v := value.(type) {
|
||||
case []interface{}:
|
||||
case []any:
|
||||
for i, u := range v {
|
||||
parseValues(fmt.Sprintf("%s[%d]", path, i), map[string]interface{}{"value": u}, result)
|
||||
parseValues(fmt.Sprintf("%s[%d]", path, i), map[string]any{"value": u}, result)
|
||||
}
|
||||
case map[string]interface{}:
|
||||
case map[string]any:
|
||||
parseValues(path, v, result)
|
||||
default:
|
||||
strValue := fmt.Sprintf("`%v`", value)
|
||||
|
Reference in New Issue
Block a user