diff --git a/cache.go b/cache.go index 788a4f2..362859c 100644 --- a/cache.go +++ b/cache.go @@ -11,6 +11,7 @@ import ( "sync" utils "github.com/gofiber/utils/v2" + utilstrings "github.com/gofiber/utils/v2/strings" ) const maxParserIndex = 1000 @@ -188,7 +189,7 @@ func (c *cache) create(t reflect.Type, parentAlias string) *structInfo { } info.fieldsByName = make(map[string]*fieldInfo, len(info.fields)) for _, field := range info.fields { - aliasKey := utils.ToLower(field.alias) + aliasKey := utilstrings.ToLower(field.alias) if _, exists := info.fieldsByName[aliasKey]; !exists { info.fieldsByName[aliasKey] = field } @@ -261,12 +262,12 @@ type structInfo struct { } func (i *structInfo) get(alias string) *fieldInfo { - aliasKey := utils.ToLower(alias) + aliasKey := utilstrings.ToLower(alias) if field, ok := i.fieldsByName[aliasKey]; ok { return field } for _, field := range i.fields { - if utils.ToLower(field.alias) == aliasKey { + if utilstrings.ToLower(field.alias) == aliasKey { return field } } diff --git a/go.mod b/go.mod index 231e350..90e88b1 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module github.com/gofiber/schema go 1.25 -require github.com/gofiber/utils/v2 v2.0.0 +require github.com/gofiber/utils/v2 v2.0.5 require github.com/google/uuid v1.6.0 // indirect diff --git a/go.sum b/go.sum index c6356b4..fa5e46d 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= -github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/gofiber/utils/v2 v2.0.0 h1:SCC3rpsEDWupFSHtc0RKxg/BKgV0s1qKfZg9Jv6D0sM= -github.com/gofiber/utils/v2 v2.0.0/go.mod h1:xF9v89FfmbrYqI/bQUGN7gR8ZtXot2jxnZvmAUtiavE= +github.com/fxamacker/cbor/v2 v2.9.2 h1:X4Ksno9+x3cz0TZv69ec1hxP/+tymuR8PXQJyDwfh78= +github.com/fxamacker/cbor/v2 v2.9.2/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gofiber/utils/v2 v2.0.5 h1:IMXoI2A5Dao/aMMBURTNxnhbtQO4kUwUFOgcwFSIjLU= +github.com/gofiber/utils/v2 v2.0.5/go.mod h1:FwwopfzwAQsoXLCHhOT24eH2jQfBgrrra9S5p0+luxg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/shamaton/msgpack/v3 v3.0.0 h1:xl40uxWkSpwBCSTvS5wyXvJRsC6AcVcYeox9PspKiZg= -github.com/shamaton/msgpack/v3 v3.0.0/go.mod h1:DcQG8jrdrQCIxr3HlMYkiXdMhK+KfN2CitkyzsQV4uc= +github.com/shamaton/msgpack/v3 v3.1.0 h1:jsk0vEAqVvvS9+fTZ5/EcQ9tz860c9pWxJ4Iwecz8gU= +github.com/shamaton/msgpack/v3 v3.1.0/go.mod h1:DcQG8jrdrQCIxr3HlMYkiXdMhK+KfN2CitkyzsQV4uc= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=