summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/reflect.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/reflect.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/reflect.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/reflect.go b/vendor/github.com/uptrace/bun/schema/reflect.go
index f13826a6c..89be8eeb6 100644
--- a/vendor/github.com/uptrace/bun/schema/reflect.go
+++ b/vendor/github.com/uptrace/bun/schema/reflect.go
@@ -46,27 +46,3 @@ func fieldByIndex(v reflect.Value, index []int) (_ reflect.Value, ok bool) {
}
return v, true
}
-
-func fieldByIndexAlloc(v reflect.Value, index []int) reflect.Value {
- if len(index) == 1 {
- return v.Field(index[0])
- }
-
- for i, idx := range index {
- if i > 0 {
- v = indirectNil(v)
- }
- v = v.Field(idx)
- }
- return v
-}
-
-func indirectNil(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Ptr {
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- v = v.Elem()
- }
- return v
-}