We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ced6565 commit b723f6aCopy full SHA for b723f6a
types/stringOrList.go
@@ -28,7 +28,11 @@ func (l *StringList) DecodeMapstructure(value interface{}) error {
28
case []interface{}:
29
list := make([]string, len(v))
30
for i, e := range v {
31
- list[i] = e.(string)
+ val, ok := e.(string)
32
+ if !ok {
33
+ return fmt.Errorf("invalid type %T for string list", value)
34
+ }
35
+ list[i] = val
36
}
37
*l = list
38
default:
0 commit comments