mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-29 21:31:48 +02:00
refactor: move some utility functions to goutils and update references
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/goccy/go-yaml"
|
||||
"github.com/puzpuzpuz/xsync/v4"
|
||||
"github.com/yusing/godoxy/internal/utils"
|
||||
gi "github.com/yusing/gointernals"
|
||||
"github.com/yusing/goutils/env"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
@@ -300,7 +299,7 @@ func mapUnmarshalValidate(src SerializedObject, dstV reflect.Value, checkValidat
|
||||
errs.Add(err.Subject(k))
|
||||
}
|
||||
} else {
|
||||
errs.Add(ErrUnknownField.Subject(k).With(gperr.DoYouMean(utils.NearestField(k, info.fieldNames))))
|
||||
errs.Add(ErrUnknownField.Subject(k).With(gperr.DoYouMeanField(k, info.fieldNames)))
|
||||
}
|
||||
}
|
||||
if info.hasValidateTag && checkValidateTag {
|
||||
|
||||
Reference in New Issue
Block a user