mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 07:42:28 -05:00
[chore] bump bun v1.1.14 -> v1.1.15 (#2195)
This commit is contained in:
parent
23dd6f664c
commit
7011f57b09
27 changed files with 273 additions and 90 deletions
24
vendor/github.com/uptrace/bun/schema/reflect.go
generated
vendored
24
vendor/github.com/uptrace/bun/schema/reflect.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue