diff options
Diffstat (limited to 'vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go b/vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go index 9e22282f5..e06bb8bc2 100644 --- a/vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go +++ b/vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go @@ -1,28 +1,11 @@ package pgdialect import ( - "fmt" "reflect" "github.com/uptrace/bun/schema" ) func scanner(typ reflect.Type) schema.ScannerFunc { - if typ.Kind() == reflect.Interface { - return scanInterface - } return schema.Scanner(typ) } - -func scanInterface(dest reflect.Value, src interface{}) error { - if dest.IsNil() { - dest.Set(reflect.ValueOf(src)) - return nil - } - - dest = dest.Elem() - if fn := scanner(dest.Type()); fn != nil { - return fn(dest, src) - } - return fmt.Errorf("bun: can't scan %#v into %s", src, dest.Type()) -} |