Stub out some advanced functions

This commit is contained in:
Brian Buller 2023-07-06 09:53:00 -05:00
parent fe8f4d644a
commit 319a3b033f

View File

@ -91,6 +91,7 @@ func (b *DB) Load(path []string, dest any) error {
}
wrk = wrkV.Interface()
fmt.Println("-> Recurse (struct)", reflect.TypeOf(wrk))
return errors.New("Recursive Loading not Implemented")
err := b.Load(append(path, fldName), &wrk)
if err != nil {
fmt.Println("-> -> Error loading.", err.Error())
@ -174,12 +175,13 @@ func (b *DB) Load(path []string, dest any) error {
}
func (b *DB) loadObject(path []string, v reflect.Value) error {
var fields structFields
switch v.Kind() {
case reflect.Struct:
fields = cachedTypeFields(t)
}
return nil
//var fields structFields
//switch v.Kind() {
//case reflect.Struct:
// fields = cachedTypeFields(t)
//}
//return nil
return errors.New("Load Object not Implemented")
}
func FieldName(fld reflect.StructField) string {