run gofmt
This commit is contained in:
@@ -17,8 +17,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"github.com/pocketbase/pocketbase/tools/auth"
|
"github.com/pocketbase/pocketbase/tools/auth"
|
||||||
"github.com/pocketbase/pocketbase/tools/dbutils"
|
"github.com/pocketbase/pocketbase/tools/dbutils"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/pocketbase/dbx"
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/ozzo-validation/v4/is"
|
"github.com/pocketbase/ozzo-validation/v4/is"
|
||||||
"github.com/pocketbase/dbx"
|
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"github.com/pocketbase/pocketbase/tools/dbutils"
|
"github.com/pocketbase/pocketbase/tools/dbutils"
|
||||||
"github.com/pocketbase/pocketbase/tools/list"
|
"github.com/pocketbase/pocketbase/tools/list"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/tools/hook"
|
"github.com/pocketbase/pocketbase/tools/hook"
|
||||||
"github.com/pocketbase/pocketbase/tools/types"
|
"github.com/pocketbase/pocketbase/tools/types"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/tools/dbutils"
|
"github.com/pocketbase/pocketbase/tools/dbutils"
|
||||||
"github.com/pocketbase/pocketbase/tools/security"
|
"github.com/pocketbase/pocketbase/tools/security"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core/validators"
|
"github.com/pocketbase/pocketbase/core/validators"
|
||||||
"github.com/pocketbase/pocketbase/tools/dbutils"
|
"github.com/pocketbase/pocketbase/tools/dbutils"
|
||||||
"github.com/pocketbase/pocketbase/tools/list"
|
"github.com/pocketbase/pocketbase/tools/list"
|
||||||
|
|||||||
+1
-1
@@ -10,8 +10,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/tools/security"
|
"github.com/pocketbase/pocketbase/tools/security"
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/tools/list"
|
"github.com/pocketbase/pocketbase/tools/list"
|
||||||
"github.com/pocketbase/pocketbase/tools/types"
|
"github.com/pocketbase/pocketbase/tools/types"
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -8,8 +8,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core/validators"
|
"github.com/pocketbase/pocketbase/core/validators"
|
||||||
"github.com/pocketbase/pocketbase/tools/security"
|
"github.com/pocketbase/pocketbase/tools/security"
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ func (r *RecordFieldResolver) updateQueryWithDeduplicateConstraint(query *dbx.Se
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:unused
|
||||||
func preferGroupBy(info *dbx.QueryInfo, fullUnquotedGroupByCol string) bool {
|
func preferGroupBy(info *dbx.QueryInfo, fullUnquotedGroupByCol string) bool {
|
||||||
if len(info.GroupBy) != 0 {
|
if len(info.GroupBy) != 0 {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core/validators"
|
"github.com/pocketbase/pocketbase/core/validators"
|
||||||
"github.com/pocketbase/pocketbase/tools/dbutils"
|
"github.com/pocketbase/pocketbase/tools/dbutils"
|
||||||
"github.com/pocketbase/pocketbase/tools/filesystem"
|
"github.com/pocketbase/pocketbase/tools/filesystem"
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ func (app *BaseApp) expandRecords(records []*Record, expandPath string, fetchFun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
existsSet = nil
|
existsSet = nil //nolint:ineffassign
|
||||||
|
|
||||||
// fetch rels
|
// fetch rels
|
||||||
rels, relsErr := fetchFunc(relCollection, relIds)
|
rels, relsErr := fetchFunc(relCollection, relIds)
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ func (s *Settings) DBExport(app App) (map[string]any, error) {
|
|||||||
|
|
||||||
// @todo remove with encoding/json/2
|
// @todo remove with encoding/json/2
|
||||||
// serialize as empty array
|
// serialize as empty array
|
||||||
|
//nolint:staticcheck
|
||||||
if s.settings.SuperuserIPs == nil {
|
if s.settings.SuperuserIPs == nil {
|
||||||
s.settings.SuperuserIPs = []string{}
|
s.settings.SuperuserIPs = []string{}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UniqueId checks whether a field string id already exists in the specified table.
|
// UniqueId checks whether a field string id already exists in the specified table.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"github.com/pocketbase/pocketbase/core/validators"
|
"github.com/pocketbase/pocketbase/core/validators"
|
||||||
"github.com/pocketbase/pocketbase/tools/security"
|
"github.com/pocketbase/pocketbase/tools/security"
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dop251/goja"
|
"github.com/dop251/goja"
|
||||||
validation "github.com/pocketbase/ozzo-validation/v4"
|
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
|
validation "github.com/pocketbase/ozzo-validation/v4"
|
||||||
"github.com/pocketbase/pocketbase/apis"
|
"github.com/pocketbase/pocketbase/apis"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
"github.com/pocketbase/pocketbase/forms"
|
"github.com/pocketbase/pocketbase/forms"
|
||||||
|
|||||||
Reference in New Issue
Block a user