altsrc: Support slices for TOML
This commit is contained in:
parent
f8347a97c6
commit
e87dfbb6bb
@ -57,8 +57,8 @@ func unmarshalMap(i interface{}) (ret map[interface{}]interface{}, err error) {
|
|||||||
} else {
|
} else {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
case reflect.Array:
|
case reflect.Array, reflect.Slice:
|
||||||
fallthrough // [todo] - Support array type
|
ret[key] = val.([]interface{})
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Unsupported: type = %#v", v.Kind())
|
return nil, fmt.Errorf("Unsupported: type = %#v", v.Kind())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user