To install the package, run:
go get github.com/go-zoox/tag- Type Validation
-
omitempty, such astag:"app_name,omitempty" -
required, such astag:"app_name,required" -
default, such astag:"app_name,default=my_app" -
enum, such astag:"app_name,enum=my_app|my_app2" -
regexp, such astag:"app_name,regexp=/^[a-zA-Z0-9_]+$/ -
min, such astag:"app_name,min=1- if type is
string, means the length of string - if type is
int64, means the minimum value of int
- if type is
-
max, such astag:"app_name,max=10- if type is
string, means the length of string - if type is
int64, means the maximum value of int
- if type is
-
- Auto Type Transform
// see test cases in tag_test.goGoZoox is released under the MIT License.