mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-20 13:30:50 +02:00
updated linter and bumped app version
This commit is contained in:
@@ -104,7 +104,7 @@ func (app *BaseApp) RecordQuery(collectionModelOrIdentifier any) *dbx.SelectQuer
|
||||
return nil
|
||||
default: // expects []RecordProxy slice
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.Kind() != reflect.Ptr || rv.IsNil() {
|
||||
if rv.Kind() != reflect.Pointer || rv.IsNil() {
|
||||
return errors.New("must be a pointer")
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func (app *BaseApp) RecordQuery(collectionModelOrIdentifier any) *dbx.SelectQuer
|
||||
et := rv.Type().Elem()
|
||||
|
||||
var isSliceOfPointers bool
|
||||
if et.Kind() == reflect.Ptr {
|
||||
if et.Kind() == reflect.Pointer {
|
||||
isSliceOfPointers = true
|
||||
et = et.Elem()
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func resolveRecordAllHook(collection *Collection, op func(dst any) error) ([]*Re
|
||||
|
||||
// dereference returns the underlying value v points to.
|
||||
func dereference(v reflect.Value) reflect.Value {
|
||||
for v.Kind() == reflect.Ptr {
|
||||
for v.Kind() == reflect.Pointer {
|
||||
if v.IsNil() {
|
||||
// initialize with a new value and continue searching
|
||||
v.Set(reflect.New(v.Type().Elem()))
|
||||
|
||||
Reference in New Issue
Block a user