16 lines
272 B
Go
16 lines
272 B
Go
|
package main
|
||
|
|
||
|
import "github.com/go-playground/validator/v10"
|
||
|
|
||
|
type structValidator struct {
|
||
|
validate *validator.Validate
|
||
|
}
|
||
|
|
||
|
func (v *structValidator) Engine() any {
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (v *structValidator) ValidateStruct(out any) error {
|
||
|
return v.validate.Struct(out)
|
||
|
}
|