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:
+1
-1
@@ -153,7 +153,7 @@ type BaseApp struct {
|
||||
//
|
||||
// @todo 1:
|
||||
// intentionally not exposed since the events are too "chatty" and
|
||||
// can cause unnecessery userland tests breaking changes;
|
||||
// can cause unnecessary userland tests breaking changes;
|
||||
// reevaluate once refactoring the file_field
|
||||
//
|
||||
// @todo 2: if exposed consider registering the same for the backup filesystem
|
||||
|
||||
@@ -59,6 +59,10 @@ func (l *Log) DBExport(app App) (map[string]any, error) {
|
||||
}
|
||||
|
||||
rawData, err := l.Data.MarshalJSON()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if int64(len(rawData)) > maxDataSize {
|
||||
truncatedData := types.JSONMap[any]{}
|
||||
|
||||
|
||||
@@ -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