validator not work
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
var validate = validator.New(validator.WithRequiredStructEnabled())
|
||||
var Validate = validator.New(validator.WithRequiredStructEnabled())
|
||||
|
||||
type AbstractAccessor struct {
|
||||
Logger zerolog.Logger
|
||||
@@ -19,10 +19,6 @@ func (dma *AbstractAccessor) GetType() string {
|
||||
return dma.Type
|
||||
}
|
||||
|
||||
func (dma *AbstractAccessor) Validate(d DBObject) error {
|
||||
return validate.Struct(d)
|
||||
}
|
||||
|
||||
func (dma *AbstractAccessor) SetLogger(t resources.ResourceType) {
|
||||
dma.Logger = logs.CreateLogger(t.String(), "")
|
||||
dma.Type = t.String()
|
||||
|
Reference in New Issue
Block a user