swapped github.com/go-ozzo/ozzo-validation with github.com/pocketbase/ozzo-validation

This commit is contained in:
Gani Georgiev
2026-07-15 13:49:34 +03:00
parent 30b4184305
commit 9afeb0c95e
61 changed files with 98 additions and 91 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"io"
"strconv"
"github.com/go-ozzo/ozzo-validation/v4/is"
"github.com/pocketbase/ozzo-validation/v4/is"
"github.com/pocketbase/pocketbase/tools/types"
"golang.org/x/oauth2"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"log/slog"
"sync"
validation "github.com/go-ozzo/ozzo-validation/v4"
validation "github.com/pocketbase/ozzo-validation/v4"
"github.com/pocketbase/pocketbase/tools/types"
)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"testing"
"time"
validation "github.com/go-ozzo/ozzo-validation/v4"
validation "github.com/pocketbase/ozzo-validation/v4"
)
func TestNewBatchHandlerPanic(t *testing.T) {
+17 -17
View File
@@ -6,19 +6,19 @@
//
// Example:
//
// registry := template.NewRegistry()
// registry := template.NewRegistry()
//
// html1, err := registry.LoadFiles(
// // the files set wil be parsed only once and then cached
// "layout.html",
// "content.html",
// ).Render(map[string]any{"name": "John"})
// html1, err := registry.LoadFiles(
// // the files set wil be parsed only once and then cached
// "layout.html",
// "content.html",
// ).Render(map[string]any{"name": "John"})
//
// html2, err := registry.LoadFiles(
// // reuse the already parsed and cached files set
// "layout.html",
// "content.html",
// ).Render(map[string]any{"name": "Jane"})
// html2, err := registry.LoadFiles(
// // reuse the already parsed and cached files set
// "layout.html",
// "content.html",
// ).Render(map[string]any{"name": "Jane"})
package template
import (
@@ -64,12 +64,12 @@ type Registry struct {
//
// Example:
//
// r.AddFuncs(map[string]any{
// "toUpper": func(str string) string {
// return strings.ToUppser(str)
// },
// ...
// })
// r.AddFuncs(map[string]any{
// "toUpper": func(str string) string {
// return strings.ToUppser(str)
// },
// ...
// })
func (r *Registry) AddFuncs(funcs map[string]any) *Registry {
for name, f := range funcs {
r.funcs[name] = f
+2 -2
View File
@@ -159,8 +159,8 @@ func TestScanAll(t *testing.T) {
},
},
{
name: "keep separators",
content: `a, b, c, d e, "a,b, c ", (123, 456)`,
name: "keep separators",
content: `a, b, c, d e, "a,b, c ", (123, 456)`,
separators: []rune{',', ' '}, // the space should be removed from the cutset
keepSeparator: true,
keepEmptyTokens: true,