Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileIsExist ¶ added in v0.0.24
FileIsExist check file is exist
func ValidateStruct ¶
func ValidateStruct(s interface{}) (err error)
开放一个通用方法,打印日志,并返回校验错误,貌似这个里封装一下,把翻译过来的错误放到输出里更好
Types ¶
type ValidatorStarter ¶
type ValidatorStarter struct {
infra.BaseStarter
}
func (*ValidatorStarter) Init ¶
func (v *ValidatorStarter) Init(ctx context.Context)
因为验证器的初始化优先级不是最高的,只需要放到web初始化接收请求之前即可,所以用Init方法来构造
Click to show internal directories.
Click to hide internal directories.