bilibili/subtitles/validator.go

16 lines
272 B
Go
Raw Normal View History

2024-07-01 17:22:31 +08:00
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)
}