From ea7eeada77a52fd58a9e1a949a39eccc7bce955a Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 13 Oct 2025 16:49:53 +0200 Subject: [chore] update dependencies (#4495) - github.com/coreos/go-oidc/v3: v3.15.0 -> v3.16.0 - github.com/go-playground/form/v4: v4.2.1 -> v4.3.0 - github.com/go-swagger/go-swagger: v0.32.3 -> v0.33.1 - golang.org/x/crypto: v0.42.0 -> v0.43.0 - golang.org/x/image: v0.31.0 -> v0.32.0 - golang.org/x/net: v0.45.0 -> v0.46.0 - golang.org/x/oauth2: v0.31.0 -> v0.32.0 - golang.org/x/sys: v0.36.0 -> v0.37.0 - golang.org/x/text: v0.29.0 -> v0.30.0 - modernc.org/sqlite: v1.39.0 -> v1.39.1 (w/ concurrency workaround) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4495 Co-authored-by: kim Co-committed-by: kim --- vendor/github.com/go-playground/validator/v10/errors.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'vendor/github.com/go-playground/validator/v10/errors.go') diff --git a/vendor/github.com/go-playground/validator/v10/errors.go b/vendor/github.com/go-playground/validator/v10/errors.go index be2676e9e..fd9062567 100644 --- a/vendor/github.com/go-playground/validator/v10/errors.go +++ b/vendor/github.com/go-playground/validator/v10/errors.go @@ -24,7 +24,6 @@ type InvalidValidationError struct { // Error returns InvalidValidationError message func (e *InvalidValidationError) Error() string { - if e.Type == nil { return "validator: (nil)" } @@ -41,11 +40,9 @@ type ValidationErrors []FieldError // All information to create an error message specific to your application is contained within // the FieldError found within the ValidationErrors array func (ve ValidationErrors) Error() string { - buff := bytes.NewBufferString("") for i := 0; i < len(ve); i++ { - buff.WriteString(ve[i].Error()) buff.WriteString("\n") } @@ -55,7 +52,6 @@ func (ve ValidationErrors) Error() string { // Translate translates all of the ValidationErrors func (ve ValidationErrors) Translate(ut ut.Translator) ValidationErrorsTranslations { - trans := make(ValidationErrorsTranslations) var fe *fieldError @@ -109,22 +105,24 @@ type FieldError interface { // StructNamespace returns the namespace for the field error, with the field's // actual name. // - // eq. "User.FirstName" see Namespace for comparison + // eg. "User.FirstName" see Namespace for comparison // // NOTE: this field can be blank when validating a single primitive field // using validate.Field(...) as there is no way to extract its name StructNamespace() string - // Field returns the fields name with the tag name taking precedence over the + // Field returns the field's name with the tag name taking precedence over the // field's actual name. // - // eq. JSON name "fname" + // `RegisterTagNameFunc` must be registered to get tag value. + // + // eg. JSON name "fname" // see StructField for comparison Field() string // StructField returns the field's actual name from the struct, when able to determine. // - // eq. "FirstName" + // eg. "FirstName" // see Field for comparison StructField() string @@ -204,7 +202,6 @@ func (fe *fieldError) StructNamespace() string { // Field returns the field's name with the tag name taking precedence over the // field's actual name. func (fe *fieldError) Field() string { - return fe.ns[len(fe.ns)-int(fe.fieldLen):] // // return fe.field // fld := fe.ns[len(fe.ns)-int(fe.fieldLen):] -- cgit v1.2.3