summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-10 14:42:14 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-10 14:42:14 +0200
commitf2e5bedea6fb93fbbf68ed8f7153c353cc57a9f0 (patch)
tree475ae9e7470d0df670ab2a59dce351cd1d07498a /vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go
parentfixes + db changes (#204) (diff)
downloadgotosocial-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/pgdialect/scan.go')
-rw-r--r--vendor/github.com/uptrace/bun/dialect/pgdialect/scan.go17
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())
-}