mirror of
https://github.com/bit1001/tdl.git
synced 2025-11-10 01:10:36 +08:00
15 lines
195 B
Go
15 lines
195 B
Go
package validator
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
)
|
|
|
|
var v *validator.Validate
|
|
|
|
func init() {
|
|
v = validator.New()
|
|
}
|
|
|
|
func Struct(s interface{}) error {
|
|
return v.Struct(s)
|
|
}
|