mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-26 06:33:42 +09:00
refactor: fix go vet errors related to composite literals (#39341)
Fix these `go vet` errors which I stumbled upon because AI likes to run `go vet` standalone and `go vet` does not understand `//nolint` like golangci does, so it produced confusing output. Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -45,7 +45,7 @@ func (j jsonProvider) NewEncoder(writer io.Writer) binding.JSONEncoder {
|
||||
}
|
||||
|
||||
func newFieldError(field reflect.StructField, cls, msg string) *BindingError {
|
||||
return &BindingError{[]string{field.Name}, cls, msg} //nolint:govet // make sure no missing fields
|
||||
return &BindingError{FieldNames: []string{field.Name}, Classification: cls, Message: msg}
|
||||
}
|
||||
|
||||
func AddValidationError(errs BindingErrors, fieldName, errorMsg string) BindingErrors {
|
||||
@@ -159,5 +159,5 @@ var Binder = sync.OnceValue(func() *binding.Binder {
|
||||
|
||||
type (
|
||||
BindingErrors = binding.Errors
|
||||
BindingError = binding.Error
|
||||
BindingError = binding.Error //exhaustruct:enforce
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user