diff options
author | 2021-09-10 14:42:14 +0200 | |
---|---|---|
committer | 2021-09-10 14:42:14 +0200 | |
commit | f2e5bedea6fb93fbbf68ed8f7153c353cc57a9f0 (patch) | |
tree | 475ae9e7470d0df670ab2a59dce351cd1d07498a /vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go | |
parent | fixes + db changes (#204) (diff) | |
download | gotosocial-f2e5bedea6fb93fbbf68ed8f7153c353cc57a9f0.tar.xz |
migrate go version to 1.17 (#203)
* migrate go version to 1.17
* update contributing
Diffstat (limited to 'vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go b/vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go index 44c50c2e9..f6f02b55a 100644 --- a/vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go +++ b/vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go @@ -1,28 +1,11 @@ package sqlitedialect 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()) -} |