feat: http router, command api
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
var notBlankStringValidator validator.Func = func(fl validator.FieldLevel) bool {
|
||||
s, ok := fl.Field().Interface().(string)
|
||||
if ok {
|
||||
if len(strings.TrimSpace(s)) == 0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user