refactor: dbms与标签管理优化

This commit is contained in:
meilin.huang
2024-03-21 17:15:52 +08:00
parent b13d27ccd6
commit b2cfd1517c
43 changed files with 536 additions and 564 deletions

View File

@@ -113,7 +113,7 @@ func baseType(t reflect.Type, expected reflect.Kind) (reflect.Type, error) {
// struct is expected but something else is given
func structOnlyError(t reflect.Type) error {
isStruct := t.Kind() == reflect.Struct
isScanner := reflect.PtrTo(t).Implements(_scannerInterface)
isScanner := reflect.PointerTo(t).Implements(_scannerInterface)
if !isStruct {
return fmt.Errorf("expected %s but got %s", reflect.Struct, t.Kind())
}