Source File
util.go
Belonging Package
github.com/uptrace/bun/internal
package internalimport ()func ( reflect.Value) func() reflect.Value {if .Kind() == reflect.Array {var intreturn func() reflect.Value {:= .Index()++return}}:= .Type().Elem()if .Kind() == reflect.Ptr {= .Elem()return func() reflect.Value {if .Len() < .Cap() {.Set(.Slice(0, .Len()+1)):= .Index(.Len() - 1)if .IsNil() {.Set(reflect.New())}return .Elem()}:= reflect.New().Set(reflect.Append(, ))return .Elem()}}:= reflect.Zero()return func() reflect.Value {if .Len() < .Cap() {.Set(.Slice(0, .Len()+1))return .Index(.Len() - 1)}.Set(reflect.Append(, ))return .Index(.Len() - 1)}}func ( error) error {, := .(interface {() error})if ! {return nil}return .()}
![]() |
The pages are generated with Golds v0.3.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |