mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-18 12:30:49 +02:00
swapped github.com/go-ozzo/ozzo-validation with github.com/pocketbase/ozzo-validation
This commit is contained in:
+1
-1
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user