Unmarshal tests

This commit is contained in:
Thomas Pelletier
2021-03-13 23:42:38 -05:00
parent fa7ee6461a
commit 3760527218
2 changed files with 102 additions and 0 deletions
+6
View File
@@ -100,6 +100,12 @@ func scope(v reflect.Value, name string) (target, error) {
switch v.Kind() {
case reflect.Struct:
return scopeStruct(v, name)
case reflect.Interface:
if v.IsNil() {
panic("not implemented") // TODO
} else {
return scope(v.Elem(), name)
}
default:
panic(fmt.Errorf("can't scope on a %s", v.Kind()))
}