add utils to pkg
CI / changes (push) Successful in 1s
CI / docker-bff (push) Successful in 1s
CI / docker-product (push) Failing after 1s

This commit is contained in:
2026-08-07 09:55:22 +08:00
parent 95d4c7bdc2
commit 10424d23d8
21 changed files with 410 additions and 1081 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"reflect"
"github.com/go-playground/validator/v10"
"pkg.local/utils"
)
// ValidatorMessages 自定义错误消息
@@ -53,7 +54,7 @@ func CopySameField(src interface{}, dst interface{}) {
func ValidateStruct(obj IValidator) string {
err := v.Struct(obj)
if err == nil {
return ""
return utils.StringEmpty
}
customMsg := obj.GetMessage()