From 1507d8dd854417fc3007002ed5782b39cee0706d Mon Sep 17 00:00:00 2001 From: Leo Cavalcante Date: Wed, 30 Sep 2026 16:20:04 -0300 Subject: [PATCH] Move validator comparisons to validgen-benchmarks. The benchmarks and the color helper check were the only imports of go-playground/validator, so this module no longer requires it. --- .github/copilot-instructions.md | 8 +- Makefile | 23 +- README.md | 35 +- docs/internals.md | 4 +- go.mod | 16 +- go.sum | 19 - testgen/README.md | 8 +- testgen/cmp_perf_no_pointer_tests.tpl | 48 - testgen/cmp_perf_pointer_tests.tpl | 52 - testgen/generate_cmp_perf_tests.go | 21 +- tests/bench/manual_coding.go | 38 - tests/bench/manual_coding_test.go | 32 - tests/bench/types.go | 17 - tests/bench/validator__.go | 31 - tests/bench/validator_test.go | 52 - tests/bench/validgen_test.go | 32 - .../generated_cmp_perf_no_pointer_test.go | 7674 -------------- .../generated_cmp_perf_pointer_test.go | 9096 ----------------- tests/cmpbenchtests/validator__.go | 6339 ------------ types/color.go | 1 + types/color_test.go | 71 +- 21 files changed, 52 insertions(+), 23565 deletions(-) delete mode 100644 testgen/cmp_perf_no_pointer_tests.tpl delete mode 100644 testgen/cmp_perf_pointer_tests.tpl delete mode 100644 tests/bench/manual_coding.go delete mode 100644 tests/bench/manual_coding_test.go delete mode 100644 tests/bench/types.go delete mode 100755 tests/bench/validator__.go delete mode 100644 tests/bench/validator_test.go delete mode 100644 tests/bench/validgen_test.go delete mode 100644 tests/cmpbenchtests/generated_cmp_perf_no_pointer_test.go delete mode 100644 tests/cmpbenchtests/generated_cmp_perf_pointer_test.go delete mode 100755 tests/cmpbenchtests/validator__.go diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index dfe162e..48ef930 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -24,7 +24,7 @@ validgen/ │ └── test_elements.go # Test condition building ├── types/ # Common types and error handling ├── _examples/ # Example usage and test cases -└── tests/ # Integration, unit, and benchmark tests +└── tests/ # Integration and end-to-end tests ``` ## Code Style & Conventions @@ -98,7 +98,7 @@ func UserValidate(obj *User) []error { - **Unit tests**: Test individual validation parsing and code generation - **Integration tests**: Test complete struct validation generation - **End-to-end tests**: Test full CLI workflow with real Go files -- **Benchmark tests**: Performance comparison with reflection-based validators +- **Benchmark tests**: Performance comparison lives in opencodeco/validgen-benchmarks ### File Processing Workflow 1. `FindFiles()` - Recursively discover `.go` files @@ -168,13 +168,13 @@ Follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/ # Typical development workflow make build # Build the binary make endtoendtests # Run full test suite -make benchtests # Run performance benchmarks +# Benchmarks live in opencodeco/validgen-benchmarks ``` ## When Working on ValidGen 1. **Always regenerate test validators** after code changes using `make endtoendtests` -2. **Run benchmarks** to ensure performance improvements with `make benchtests` +2. **Run benchmarks** from opencodeco/validgen-benchmarks when a change can affect generated validation speed 3. **Test multiple packages** - structs in different packages should work correctly 4. **Validate generated code** - ensure it compiles and passes tests 5. **Maintain compatibility** - keep validator tag syntax compatible where possible diff --git a/Makefile b/Makefile index 50e8c8d..a555844 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ -.PHONY: clean unittests benchtests build endtoendtests cmpbenchtests testgen setup lint +.PHONY: clean unittests build endtoendtests testgen setup lint BIN_DIR=bin BIN_NAME=validgen VALIDGEN_BIN=$(BIN_DIR)/$(BIN_NAME) -BENCH_TIME=5s +ifdef VALIDGEN_BENCHMARKS_DIR +export VALIDGEN_BENCHMARKS_DIR := $(abspath $(VALIDGEN_BENCHMARKS_DIR)) +endif GOLANGCILINT_PATH=$(HOME)/bin GOLANGCILINT_BIN=$(GOLANGCILINT_PATH)/golangci-lint -all: clean unittests build endtoendtests benchtests cmpbenchtests +all: clean unittests build endtoendtests clean: @echo "Cleaning" @@ -18,20 +20,13 @@ unittests: go clean -testcache go test -v ./internal/... ./types/... ./testgen/ -benchtests: build - @echo "Running bench tests" - find tests/bench/ -name '*_validator.go' -exec rm \{} \; - $(VALIDGEN_BIN) tests/bench - go clean -testcache - go test -bench=. -v -benchmem -benchtime=$(BENCH_TIME) ./tests/bench - build: clean @echo "Building" go build -o $(VALIDGEN_BIN) . testgen: @echo "Generating tests" - cd testgen/ && rm -f generated_*.go && go run *.go && mv generated_endtoend_*tests.go ../tests/endtoend/ && mv generated_validation_*_test.go ../internal/codegenerator/ && mv generated_function_code_*_test.go ../internal/codegenerator/ && mv generated_cmp_perf_*.go ../tests/cmpbenchtests/ + cd testgen/ && rm -f generated_*.go && go run . && mv generated_endtoend_*tests.go ../tests/endtoend/ && mv generated_validation_*_test.go ../internal/codegenerator/ && mv generated_function_code_*_test.go ../internal/codegenerator/ endtoendtests: build @echo "Running endtoend tests" @@ -43,12 +38,6 @@ endtoendtests: build $(VALIDGEN_BIN) -unmarshal-json tests/jsonunmarshal cd tests/jsonunmarshal; go run . -cmpbenchtests: build - @echo "Running cmp bench tests" - $(VALIDGEN_BIN) tests/cmpbenchtests/ - go clean -testcache - go test -bench=. -v -benchmem -benchtime=$(BENCH_TIME) ./tests/cmpbenchtests/ - setup: @echo "Setting up" curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(GOLANGCILINT_PATH) v2.5.0 diff --git a/README.md b/README.md index b4b478d..2905721 100644 --- a/README.md +++ b/README.md @@ -183,18 +183,19 @@ cd validgen make unittests ``` -## Steps to run the benchmark tests +## Benchmarks -The steps to run the benchmark tests are: +Comparisons with [go-playground/validator](https://github.com/go-playground/validator) live in [validgen-benchmarks](https://github.com/opencodeco/validgen-benchmarks). That module holds the small three-way benchmark, the generated comparison suite, and the color helper check. ```bash -# Enter in the project root folder -cd validgen - -# Run the benchmark tests -make benchtests +git clone git@github.com:opencodeco/validgen-benchmarks.git +cd validgen-benchmarks +make bench +make color ``` +`make cmp` runs the generated suite. The default bench time is 5 seconds per benchmark. `make cmp BENCH_TIME=100ms` is a shorter pass. + ## Steps to run the end-to-end tests The steps to run the end-to-end tests are: @@ -262,28 +263,14 @@ cd _examples/test03 go run . ``` -## Steps to run the benchmark tests comparing ValidGen and Validator - -The steps to run the benchmark tests are: - -```bash -# Enter in the project root folder -cd validgen - -# Run the benchmark tests -make cmpbenchtests -``` - -The command `make cmpbenchtests` invoke the following command: - -`go test -bench=. -v -benchmem -benchtime=5s ./tests/cmpbenchtests/generated_tests` +## Recorded comparison results -The setup used was: +These numbers are from an Apple M4 Pro, 12 cores, running `go test -bench=. -benchmem -benchtime=5s` on the generated suite: ```bash goos: darwin goarch: arm64 -pkg: github.com/opencodeco/validgen/tests/cmpbenchtests/generated_tests +pkg: github.com/opencodeco/validgen-benchmarks/cmp cpu: Apple M4 Pro (12 Cores used) ``` diff --git a/docs/internals.md b/docs/internals.md index b2e2716..71de3c3 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -162,12 +162,12 @@ The same path is rewritten on every run. Structs in one package and directory sh TestGen is `package main` in `testgen/`. `make testgen` runs it and moves the files it writes. -`generate_tests.go` calls four generators. Each one executes a template under `testgen/`, formats the result with `go/format`, and writes a pair of pointer and non-pointer files. +`generate_tests.go` calls four generators. Three of them execute a template under `testgen/`. The comparative benchmark generator reads its templates from `$VALIDGEN_BENCHMARKS_DIR/cmp` when that variable is set. Each generator formats the result with `go/format` and writes a pair of pointer and non-pointer files. - `generated_endtoend_no_pointer_tests.go` and `generated_endtoend_pointer_tests.go` move to `tests/endtoend/`. - `generated_validation_code_no_pointer_test.go` and `generated_validation_code_pointer_test.go` move to `internal/codegenerator/`. - `generated_function_code_no_pointer_test.go` and `generated_function_code_pointer_test.go` move to `internal/codegenerator/`. -- `generated_cmp_perf_no_pointer_test.go` and `generated_cmp_perf_pointer_test.go` move to `tests/cmpbenchtests/`. +- `generated_cmp_perf_no_pointer_test.go` and `generated_cmp_perf_pointer_test.go` are written to `$VALIDGEN_BENCHMARKS_DIR/cmp/` when that variable is set. The templates are in [validgen-benchmarks](https://github.com/opencodeco/validgen-benchmarks). TestGen skips those files when the variable is unset. The case list is `typesValidation` in `testgen/validations.go`. [testgen/README.md](../testgen/README.md) records which suites that list drives and which suites stay hand-written. diff --git a/go.mod b/go.mod index cc110be..6e4793c 100644 --- a/go.mod +++ b/go.mod @@ -3,20 +3,8 @@ module github.com/opencodeco/validgen go 1.24.3 require ( - github.com/go-playground/validator/v10 v10.28.0 github.com/sergi/go-diff v1.4.0 - github.com/stretchr/testify v1.11.1 + golang.org/x/text v0.29.0 ) -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gabriel-vasile/mimetype v1.4.10 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/leodido/go-urn v1.4.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/crypto v0.42.0 // indirect - golang.org/x/sys v0.36.0 // indirect - golang.org/x/text v0.29.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) +require github.com/stretchr/testify v1.11.1 // indirect diff --git a/go.sum b/go.sum index 5a351b8..df43744 100644 --- a/go.sum +++ b/go.sum @@ -1,23 +1,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= -github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= -github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= @@ -26,14 +12,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= -golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/testgen/README.md b/testgen/README.md index dfc798a..3e006bf 100644 --- a/testgen/README.md +++ b/testgen/README.md @@ -74,9 +74,9 @@ However, these generators lacked a common configuration, didn't implement all te ## What TestGen generates -`typesValidation` in `validations.go` is the case list. `make testgen` walks that list and writes four suites. Each suite is a pointer file and a non-pointer file. The list contains non-field operations only. +`typesValidation` in `validations.go` is the case list. `make testgen` walks that list and writes the end-to-end suite and the two unit-test suites. It writes the comparative benchmark suite when `VALIDGEN_BENCHMARKS_DIR` is set. Each suite is a pointer file and a non-pointer file. The list contains non-field operations only. -- Benchmark tests between ValidGen and GoValidator, in `tests/cmpbenchtests/generated_cmp_perf_*`. +- Benchmark tests between ValidGen and GoValidator, written to `opencodeco/validgen-benchmarks` when `VALIDGEN_BENCHMARKS_DIR` is set. The templates are `cmp/cmp_perf_*_tests.tpl` in that repository. - End-to-end tests for each validation, type class, and valid or invalid input, in `tests/endtoend/generated_endtoend_*`. - Unit tests for `BuildValidationCode`, in `internal/codegenerator/generated_validation_code_*`. - Unit tests for the generated validator function, in `internal/codegenerator/generated_function_code_*`. @@ -115,4 +115,8 @@ cd validgen # Run testgen make testgen + +# Also regenerate the comparative benchmarks +export VALIDGEN_BENCHMARKS_DIR=/absolute/path/to/validgen-benchmarks +make testgen ``` diff --git a/testgen/cmp_perf_no_pointer_tests.tpl b/testgen/cmp_perf_no_pointer_tests.tpl deleted file mode 100644 index 49a3d95..0000000 --- a/testgen/cmp_perf_no_pointer_tests.tpl +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by TestGen. DO NOT EDIT. - -package benchtests - -import ( - "testing" - - "github.com/go-playground/validator/v10" -) - -{{range .Tests}} -type ValidGen{{.TestName}}Struct struct { - Field {{.FieldType}} `valid:"{{.ValidGenTag}}"` -} - -type Validator{{.TestName}}Struct struct { - Field {{.FieldType}} `validate:"{{.ValidatorTag}}"` -} -{{end}} - -{{range .Tests}} -func BenchmarkValidGen{{.TestName}}(b *testing.B) { - data := &ValidGen{{.TestName}}Struct{ - Field: {{.ValidInput}}, - } - - for b.Loop() { - if err := ValidGen{{.TestName}}StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidator{{.TestName}}(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &Validator{{.TestName}}Struct{ - Field: {{.ValidInput}}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} -{{end}} \ No newline at end of file diff --git a/testgen/cmp_perf_pointer_tests.tpl b/testgen/cmp_perf_pointer_tests.tpl deleted file mode 100644 index cae5284..0000000 --- a/testgen/cmp_perf_pointer_tests.tpl +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by TestGen. DO NOT EDIT. - -package benchtests - -import ( - "testing" - - "github.com/go-playground/validator/v10" -) - -{{range .Tests}} -type ValidGen{{.TestName}}Struct struct { - Field {{.FieldType}} `valid:"{{.ValidGenTag}}"` -} - -type Validator{{.TestName}}Struct struct { - Field {{.FieldType}} `validate:"{{.ValidatorTag}}"` -} -{{end}} - -{{range .Tests}} -func BenchmarkValidGen{{.TestName}}(b *testing.B) { - var validInput {{.BasicType}} = {{.ValidInput}} - data := &ValidGen{{.TestName}}Struct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGen{{.TestName}}StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidator{{.TestName}}(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput {{.BasicType}} = {{.ValidInput}} - - data := &Validator{{.TestName}}Struct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} -{{end}} \ No newline at end of file diff --git a/testgen/generate_cmp_perf_tests.go b/testgen/generate_cmp_perf_tests.go index 4326ec3..21ceb3b 100644 --- a/testgen/generate_cmp_perf_tests.go +++ b/testgen/generate_cmp_perf_tests.go @@ -2,6 +2,8 @@ package main import ( "fmt" + "os" + "path/filepath" "strings" "github.com/opencodeco/validgen/internal/common" @@ -23,11 +25,26 @@ type CmpBenchTest struct { } func generateComparativePerformanceTests() error { - if err := generateComparativePerformanceTest("cmp_perf_no_pointer_tests.tpl", "generated_cmp_perf_no_pointer_test.go", false); err != nil { + dir := os.Getenv("VALIDGEN_BENCHMARKS_DIR") + if dir == "" { + fmt.Println("Skipping comparative performance tests: VALIDGEN_BENCHMARKS_DIR is not set") + return nil + } + + cmpDir := filepath.Join(dir, "cmp") + if err := generateComparativePerformanceTest( + filepath.Join(cmpDir, "cmp_perf_no_pointer_tests.tpl"), + filepath.Join(cmpDir, "generated_cmp_perf_no_pointer_test.go"), + false, + ); err != nil { return err } - if err := generateComparativePerformanceTest("cmp_perf_pointer_tests.tpl", "generated_cmp_perf_pointer_test.go", true); err != nil { + if err := generateComparativePerformanceTest( + filepath.Join(cmpDir, "cmp_perf_pointer_tests.tpl"), + filepath.Join(cmpDir, "generated_cmp_perf_pointer_test.go"), + true, + ); err != nil { return err } diff --git a/tests/bench/manual_coding.go b/tests/bench/manual_coding.go deleted file mode 100644 index 5c80df8..0000000 --- a/tests/bench/manual_coding.go +++ /dev/null @@ -1,38 +0,0 @@ -package benchtests - -import ( - "errors" - "fmt" -) - -var ErrValidation = errors.New("validation error") - -func ManualCodingValidate(obj *StructManualCoding) []error { - var errs []error - - if obj.FirstName == "" { - errs = append(errs, fmt.Errorf("%w: FirstName is required", ErrValidation)) - } - - if obj.LastName == "" { - errs = append(errs, fmt.Errorf("%w: LastName is required", ErrValidation)) - } - - if obj.Age < 18 { - errs = append(errs, fmt.Errorf("%w: Age must be >= 18", ErrValidation)) - } - - if obj.Age > 130 { - errs = append(errs, fmt.Errorf("%w: Age must be <= 130", ErrValidation)) - } - - if len(obj.UserName) < 5 { - errs = append(errs, fmt.Errorf("%w: UserName length must be >= 5", ErrValidation)) - } - - if len(obj.UserName) > 10 { - errs = append(errs, fmt.Errorf("%w: UserName length must be <= 10", ErrValidation)) - } - - return errs -} diff --git a/tests/bench/manual_coding_test.go b/tests/bench/manual_coding_test.go deleted file mode 100644 index fa8a5c8..0000000 --- a/tests/bench/manual_coding_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package benchtests - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestManualCoding(t *testing.T) { - data := &StructManualCoding{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - errors := ManualCodingValidate(data) - assert.Equal(t, 0, len(errors)) -} - -func BenchmarkManualCoding(b *testing.B) { - for b.Loop() { - data := &StructManualCoding{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - ManualCodingValidate(data) - } -} diff --git a/tests/bench/types.go b/tests/bench/types.go deleted file mode 100644 index 6110869..0000000 --- a/tests/bench/types.go +++ /dev/null @@ -1,17 +0,0 @@ -package benchtests - -type StructValidGen struct { - FirstName string `valid:"required"` - LastName string `valid:"required"` - Age uint8 `valid:"gte=18,lte=130"` - UserName string `valid:"min=5,max=10"` - Optional string -} - -type StructManualCoding struct { - FirstName string - LastName string - Age uint8 - UserName string - Optional string -} diff --git a/tests/bench/validator__.go b/tests/bench/validator__.go deleted file mode 100755 index b155eb7..0000000 --- a/tests/bench/validator__.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by ValidGen. DO NOT EDIT. - -//nolint:all -package benchtests - -import ( - "github.com/opencodeco/validgen/types" -) - -func StructValidGenValidate(obj *StructValidGen) []error { - var errs []error - if !(obj.FirstName != "") { - errs = append(errs, types.NewValidationError("FirstName is required")) - } - if !(obj.LastName != "") { - errs = append(errs, types.NewValidationError("LastName is required")) - } - if !(obj.Age >= 18) { - errs = append(errs, types.NewValidationError("Age must be >= 18")) - } - if !(obj.Age <= 130) { - errs = append(errs, types.NewValidationError("Age must be <= 130")) - } - if !(len(obj.UserName) >= 5) { - errs = append(errs, types.NewValidationError("UserName length must be >= 5")) - } - if !(len(obj.UserName) <= 10) { - errs = append(errs, types.NewValidationError("UserName length must be <= 10")) - } - return errs -} diff --git a/tests/bench/validator_test.go b/tests/bench/validator_test.go deleted file mode 100644 index 4b2a7f0..0000000 --- a/tests/bench/validator_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package benchtests - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/go-playground/validator/v10" -) - -type StructValidator struct { - FirstName string `validate:"required"` - LastName string `validate:"required"` - Age uint8 `validate:"gte=18,lte=130"` - UserName string `validate:"min=5,max=10"` - Optional string -} - -func TestValidator(t *testing.T) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - data := &StructValidator{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - err := validate.Struct(data) - - assert.NoError(t, err) -} - -func BenchmarkValidator(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - for b.Loop() { - - data := &StructValidator{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - validate.Struct(data) - } -} diff --git a/tests/bench/validgen_test.go b/tests/bench/validgen_test.go deleted file mode 100644 index d8fd23e..0000000 --- a/tests/bench/validgen_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package benchtests - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestValidGen(t *testing.T) { - data := &StructValidGen{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - errors := StructValidGenValidate(data) - assert.Equal(t, 0, len(errors)) -} - -func BenchmarkValidGen(b *testing.B) { - for b.Loop() { - data := &StructValidGen{ - FirstName: "First", - LastName: "Last", - Age: 49, - UserName: "myusername", - } - - StructValidGenValidate(data) - } -} diff --git a/tests/cmpbenchtests/generated_cmp_perf_no_pointer_test.go b/tests/cmpbenchtests/generated_cmp_perf_no_pointer_test.go deleted file mode 100644 index bb96ee7..0000000 --- a/tests/cmpbenchtests/generated_cmp_perf_no_pointer_test.go +++ /dev/null @@ -1,7674 +0,0 @@ -// Code generated by TestGen. DO NOT EDIT. - -package benchtests - -import ( - "testing" - - "github.com/go-playground/validator/v10" -) - -type ValidGenEmailStringStruct struct { - Field string `valid:"email"` -} - -type ValidatorEmailStringStruct struct { - Field string `validate:"email"` -} - -type ValidGenRequiredStringStruct struct { - Field string `valid:"required"` -} - -type ValidatorRequiredStringStruct struct { - Field string `validate:"required"` -} - -type ValidGenRequiredIntStruct struct { - Field int `valid:"required"` -} - -type ValidatorRequiredIntStruct struct { - Field int `validate:"required"` -} - -type ValidGenRequiredInt8Struct struct { - Field int8 `valid:"required"` -} - -type ValidatorRequiredInt8Struct struct { - Field int8 `validate:"required"` -} - -type ValidGenRequiredInt16Struct struct { - Field int16 `valid:"required"` -} - -type ValidatorRequiredInt16Struct struct { - Field int16 `validate:"required"` -} - -type ValidGenRequiredInt32Struct struct { - Field int32 `valid:"required"` -} - -type ValidatorRequiredInt32Struct struct { - Field int32 `validate:"required"` -} - -type ValidGenRequiredInt64Struct struct { - Field int64 `valid:"required"` -} - -type ValidatorRequiredInt64Struct struct { - Field int64 `validate:"required"` -} - -type ValidGenRequiredUintStruct struct { - Field uint `valid:"required"` -} - -type ValidatorRequiredUintStruct struct { - Field uint `validate:"required"` -} - -type ValidGenRequiredUint8Struct struct { - Field uint8 `valid:"required"` -} - -type ValidatorRequiredUint8Struct struct { - Field uint8 `validate:"required"` -} - -type ValidGenRequiredUint16Struct struct { - Field uint16 `valid:"required"` -} - -type ValidatorRequiredUint16Struct struct { - Field uint16 `validate:"required"` -} - -type ValidGenRequiredUint32Struct struct { - Field uint32 `valid:"required"` -} - -type ValidatorRequiredUint32Struct struct { - Field uint32 `validate:"required"` -} - -type ValidGenRequiredUint64Struct struct { - Field uint64 `valid:"required"` -} - -type ValidatorRequiredUint64Struct struct { - Field uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32Struct struct { - Field float32 `valid:"required"` -} - -type ValidatorRequiredFloat32Struct struct { - Field float32 `validate:"required"` -} - -type ValidGenRequiredFloat64Struct struct { - Field float64 `valid:"required"` -} - -type ValidatorRequiredFloat64Struct struct { - Field float64 `validate:"required"` -} - -type ValidGenRequiredBoolStruct struct { - Field bool `valid:"required"` -} - -type ValidatorRequiredBoolStruct struct { - Field bool `validate:"required"` -} - -type ValidGenRequiredStringSliceStruct struct { - Field []string `valid:"required"` -} - -type ValidatorRequiredStringSliceStruct struct { - Field []string `validate:"required"` -} - -type ValidGenRequiredIntSliceStruct struct { - Field []int `valid:"required"` -} - -type ValidatorRequiredIntSliceStruct struct { - Field []int `validate:"required"` -} - -type ValidGenRequiredInt8SliceStruct struct { - Field []int8 `valid:"required"` -} - -type ValidatorRequiredInt8SliceStruct struct { - Field []int8 `validate:"required"` -} - -type ValidGenRequiredInt16SliceStruct struct { - Field []int16 `valid:"required"` -} - -type ValidatorRequiredInt16SliceStruct struct { - Field []int16 `validate:"required"` -} - -type ValidGenRequiredInt32SliceStruct struct { - Field []int32 `valid:"required"` -} - -type ValidatorRequiredInt32SliceStruct struct { - Field []int32 `validate:"required"` -} - -type ValidGenRequiredInt64SliceStruct struct { - Field []int64 `valid:"required"` -} - -type ValidatorRequiredInt64SliceStruct struct { - Field []int64 `validate:"required"` -} - -type ValidGenRequiredUintSliceStruct struct { - Field []uint `valid:"required"` -} - -type ValidatorRequiredUintSliceStruct struct { - Field []uint `validate:"required"` -} - -type ValidGenRequiredUint8SliceStruct struct { - Field []uint8 `valid:"required"` -} - -type ValidatorRequiredUint8SliceStruct struct { - Field []uint8 `validate:"required"` -} - -type ValidGenRequiredUint16SliceStruct struct { - Field []uint16 `valid:"required"` -} - -type ValidatorRequiredUint16SliceStruct struct { - Field []uint16 `validate:"required"` -} - -type ValidGenRequiredUint32SliceStruct struct { - Field []uint32 `valid:"required"` -} - -type ValidatorRequiredUint32SliceStruct struct { - Field []uint32 `validate:"required"` -} - -type ValidGenRequiredUint64SliceStruct struct { - Field []uint64 `valid:"required"` -} - -type ValidatorRequiredUint64SliceStruct struct { - Field []uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32SliceStruct struct { - Field []float32 `valid:"required"` -} - -type ValidatorRequiredFloat32SliceStruct struct { - Field []float32 `validate:"required"` -} - -type ValidGenRequiredFloat64SliceStruct struct { - Field []float64 `valid:"required"` -} - -type ValidatorRequiredFloat64SliceStruct struct { - Field []float64 `validate:"required"` -} - -type ValidGenRequiredBoolSliceStruct struct { - Field []bool `valid:"required"` -} - -type ValidatorRequiredBoolSliceStruct struct { - Field []bool `validate:"required"` -} - -type ValidGenRequiredStringMapStruct struct { - Field map[string]string `valid:"required"` -} - -type ValidatorRequiredStringMapStruct struct { - Field map[string]string `validate:"required"` -} - -type ValidGenRequiredIntMapStruct struct { - Field map[int]int `valid:"required"` -} - -type ValidatorRequiredIntMapStruct struct { - Field map[int]int `validate:"required"` -} - -type ValidGenRequiredInt8MapStruct struct { - Field map[int8]int8 `valid:"required"` -} - -type ValidatorRequiredInt8MapStruct struct { - Field map[int8]int8 `validate:"required"` -} - -type ValidGenRequiredInt16MapStruct struct { - Field map[int16]int16 `valid:"required"` -} - -type ValidatorRequiredInt16MapStruct struct { - Field map[int16]int16 `validate:"required"` -} - -type ValidGenRequiredInt32MapStruct struct { - Field map[int32]int32 `valid:"required"` -} - -type ValidatorRequiredInt32MapStruct struct { - Field map[int32]int32 `validate:"required"` -} - -type ValidGenRequiredInt64MapStruct struct { - Field map[int64]int64 `valid:"required"` -} - -type ValidatorRequiredInt64MapStruct struct { - Field map[int64]int64 `validate:"required"` -} - -type ValidGenRequiredUintMapStruct struct { - Field map[uint]uint `valid:"required"` -} - -type ValidatorRequiredUintMapStruct struct { - Field map[uint]uint `validate:"required"` -} - -type ValidGenRequiredUint8MapStruct struct { - Field map[uint8]uint8 `valid:"required"` -} - -type ValidatorRequiredUint8MapStruct struct { - Field map[uint8]uint8 `validate:"required"` -} - -type ValidGenRequiredUint16MapStruct struct { - Field map[uint16]uint16 `valid:"required"` -} - -type ValidatorRequiredUint16MapStruct struct { - Field map[uint16]uint16 `validate:"required"` -} - -type ValidGenRequiredUint32MapStruct struct { - Field map[uint32]uint32 `valid:"required"` -} - -type ValidatorRequiredUint32MapStruct struct { - Field map[uint32]uint32 `validate:"required"` -} - -type ValidGenRequiredUint64MapStruct struct { - Field map[uint64]uint64 `valid:"required"` -} - -type ValidatorRequiredUint64MapStruct struct { - Field map[uint64]uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32MapStruct struct { - Field map[float32]float32 `valid:"required"` -} - -type ValidatorRequiredFloat32MapStruct struct { - Field map[float32]float32 `validate:"required"` -} - -type ValidGenRequiredFloat64MapStruct struct { - Field map[float64]float64 `valid:"required"` -} - -type ValidatorRequiredFloat64MapStruct struct { - Field map[float64]float64 `validate:"required"` -} - -type ValidGenRequiredBoolMapStruct struct { - Field map[bool]bool `valid:"required"` -} - -type ValidatorRequiredBoolMapStruct struct { - Field map[bool]bool `validate:"required"` -} - -type ValidGenEqStringStruct struct { - Field string `valid:"eq=abcde"` -} - -type ValidatorEqStringStruct struct { - Field string `validate:"eq=abcde"` -} - -type ValidGenEqIntStruct struct { - Field int `valid:"eq=32"` -} - -type ValidatorEqIntStruct struct { - Field int `validate:"eq=32"` -} - -type ValidGenEqInt8Struct struct { - Field int8 `valid:"eq=32"` -} - -type ValidatorEqInt8Struct struct { - Field int8 `validate:"eq=32"` -} - -type ValidGenEqInt16Struct struct { - Field int16 `valid:"eq=32"` -} - -type ValidatorEqInt16Struct struct { - Field int16 `validate:"eq=32"` -} - -type ValidGenEqInt32Struct struct { - Field int32 `valid:"eq=32"` -} - -type ValidatorEqInt32Struct struct { - Field int32 `validate:"eq=32"` -} - -type ValidGenEqInt64Struct struct { - Field int64 `valid:"eq=32"` -} - -type ValidatorEqInt64Struct struct { - Field int64 `validate:"eq=32"` -} - -type ValidGenEqUintStruct struct { - Field uint `valid:"eq=32"` -} - -type ValidatorEqUintStruct struct { - Field uint `validate:"eq=32"` -} - -type ValidGenEqUint8Struct struct { - Field uint8 `valid:"eq=32"` -} - -type ValidatorEqUint8Struct struct { - Field uint8 `validate:"eq=32"` -} - -type ValidGenEqUint16Struct struct { - Field uint16 `valid:"eq=32"` -} - -type ValidatorEqUint16Struct struct { - Field uint16 `validate:"eq=32"` -} - -type ValidGenEqUint32Struct struct { - Field uint32 `valid:"eq=32"` -} - -type ValidatorEqUint32Struct struct { - Field uint32 `validate:"eq=32"` -} - -type ValidGenEqUint64Struct struct { - Field uint64 `valid:"eq=32"` -} - -type ValidatorEqUint64Struct struct { - Field uint64 `validate:"eq=32"` -} - -type ValidGenEqFloat32Struct struct { - Field float32 `valid:"eq=12.34"` -} - -type ValidatorEqFloat32Struct struct { - Field float32 `validate:"eq=12.34"` -} - -type ValidGenEqFloat64Struct struct { - Field float64 `valid:"eq=12.34"` -} - -type ValidatorEqFloat64Struct struct { - Field float64 `validate:"eq=12.34"` -} - -type ValidGenEqBoolStruct struct { - Field bool `valid:"eq=true"` -} - -type ValidatorEqBoolStruct struct { - Field bool `validate:"eq=true"` -} - -type ValidGenNeqStringStruct struct { - Field string `valid:"neq=abcde"` -} - -type ValidatorNeqStringStruct struct { - Field string `validate:"ne=abcde"` -} - -type ValidGenNeqIntStruct struct { - Field int `valid:"neq=32"` -} - -type ValidatorNeqIntStruct struct { - Field int `validate:"ne=32"` -} - -type ValidGenNeqInt8Struct struct { - Field int8 `valid:"neq=32"` -} - -type ValidatorNeqInt8Struct struct { - Field int8 `validate:"ne=32"` -} - -type ValidGenNeqInt16Struct struct { - Field int16 `valid:"neq=32"` -} - -type ValidatorNeqInt16Struct struct { - Field int16 `validate:"ne=32"` -} - -type ValidGenNeqInt32Struct struct { - Field int32 `valid:"neq=32"` -} - -type ValidatorNeqInt32Struct struct { - Field int32 `validate:"ne=32"` -} - -type ValidGenNeqInt64Struct struct { - Field int64 `valid:"neq=32"` -} - -type ValidatorNeqInt64Struct struct { - Field int64 `validate:"ne=32"` -} - -type ValidGenNeqUintStruct struct { - Field uint `valid:"neq=32"` -} - -type ValidatorNeqUintStruct struct { - Field uint `validate:"ne=32"` -} - -type ValidGenNeqUint8Struct struct { - Field uint8 `valid:"neq=32"` -} - -type ValidatorNeqUint8Struct struct { - Field uint8 `validate:"ne=32"` -} - -type ValidGenNeqUint16Struct struct { - Field uint16 `valid:"neq=32"` -} - -type ValidatorNeqUint16Struct struct { - Field uint16 `validate:"ne=32"` -} - -type ValidGenNeqUint32Struct struct { - Field uint32 `valid:"neq=32"` -} - -type ValidatorNeqUint32Struct struct { - Field uint32 `validate:"ne=32"` -} - -type ValidGenNeqUint64Struct struct { - Field uint64 `valid:"neq=32"` -} - -type ValidatorNeqUint64Struct struct { - Field uint64 `validate:"ne=32"` -} - -type ValidGenNeqFloat32Struct struct { - Field float32 `valid:"neq=12.34"` -} - -type ValidatorNeqFloat32Struct struct { - Field float32 `validate:"ne=12.34"` -} - -type ValidGenNeqFloat64Struct struct { - Field float64 `valid:"neq=12.34"` -} - -type ValidatorNeqFloat64Struct struct { - Field float64 `validate:"ne=12.34"` -} - -type ValidGenNeqBoolStruct struct { - Field bool `valid:"neq=true"` -} - -type ValidatorNeqBoolStruct struct { - Field bool `validate:"ne=true"` -} - -type ValidGenGtIntStruct struct { - Field int `valid:"gt=32"` -} - -type ValidatorGtIntStruct struct { - Field int `validate:"gt=32"` -} - -type ValidGenGtInt8Struct struct { - Field int8 `valid:"gt=32"` -} - -type ValidatorGtInt8Struct struct { - Field int8 `validate:"gt=32"` -} - -type ValidGenGtInt16Struct struct { - Field int16 `valid:"gt=32"` -} - -type ValidatorGtInt16Struct struct { - Field int16 `validate:"gt=32"` -} - -type ValidGenGtInt32Struct struct { - Field int32 `valid:"gt=32"` -} - -type ValidatorGtInt32Struct struct { - Field int32 `validate:"gt=32"` -} - -type ValidGenGtInt64Struct struct { - Field int64 `valid:"gt=32"` -} - -type ValidatorGtInt64Struct struct { - Field int64 `validate:"gt=32"` -} - -type ValidGenGtUintStruct struct { - Field uint `valid:"gt=32"` -} - -type ValidatorGtUintStruct struct { - Field uint `validate:"gt=32"` -} - -type ValidGenGtUint8Struct struct { - Field uint8 `valid:"gt=32"` -} - -type ValidatorGtUint8Struct struct { - Field uint8 `validate:"gt=32"` -} - -type ValidGenGtUint16Struct struct { - Field uint16 `valid:"gt=32"` -} - -type ValidatorGtUint16Struct struct { - Field uint16 `validate:"gt=32"` -} - -type ValidGenGtUint32Struct struct { - Field uint32 `valid:"gt=32"` -} - -type ValidatorGtUint32Struct struct { - Field uint32 `validate:"gt=32"` -} - -type ValidGenGtUint64Struct struct { - Field uint64 `valid:"gt=32"` -} - -type ValidatorGtUint64Struct struct { - Field uint64 `validate:"gt=32"` -} - -type ValidGenGtFloat32Struct struct { - Field float32 `valid:"gt=12.34"` -} - -type ValidatorGtFloat32Struct struct { - Field float32 `validate:"gt=12.34"` -} - -type ValidGenGtFloat64Struct struct { - Field float64 `valid:"gt=12.34"` -} - -type ValidatorGtFloat64Struct struct { - Field float64 `validate:"gt=12.34"` -} - -type ValidGenGteIntStruct struct { - Field int `valid:"gte=32"` -} - -type ValidatorGteIntStruct struct { - Field int `validate:"gte=32"` -} - -type ValidGenGteInt8Struct struct { - Field int8 `valid:"gte=32"` -} - -type ValidatorGteInt8Struct struct { - Field int8 `validate:"gte=32"` -} - -type ValidGenGteInt16Struct struct { - Field int16 `valid:"gte=32"` -} - -type ValidatorGteInt16Struct struct { - Field int16 `validate:"gte=32"` -} - -type ValidGenGteInt32Struct struct { - Field int32 `valid:"gte=32"` -} - -type ValidatorGteInt32Struct struct { - Field int32 `validate:"gte=32"` -} - -type ValidGenGteInt64Struct struct { - Field int64 `valid:"gte=32"` -} - -type ValidatorGteInt64Struct struct { - Field int64 `validate:"gte=32"` -} - -type ValidGenGteUintStruct struct { - Field uint `valid:"gte=32"` -} - -type ValidatorGteUintStruct struct { - Field uint `validate:"gte=32"` -} - -type ValidGenGteUint8Struct struct { - Field uint8 `valid:"gte=32"` -} - -type ValidatorGteUint8Struct struct { - Field uint8 `validate:"gte=32"` -} - -type ValidGenGteUint16Struct struct { - Field uint16 `valid:"gte=32"` -} - -type ValidatorGteUint16Struct struct { - Field uint16 `validate:"gte=32"` -} - -type ValidGenGteUint32Struct struct { - Field uint32 `valid:"gte=32"` -} - -type ValidatorGteUint32Struct struct { - Field uint32 `validate:"gte=32"` -} - -type ValidGenGteUint64Struct struct { - Field uint64 `valid:"gte=32"` -} - -type ValidatorGteUint64Struct struct { - Field uint64 `validate:"gte=32"` -} - -type ValidGenGteFloat32Struct struct { - Field float32 `valid:"gte=12.34"` -} - -type ValidatorGteFloat32Struct struct { - Field float32 `validate:"gte=12.34"` -} - -type ValidGenGteFloat64Struct struct { - Field float64 `valid:"gte=12.34"` -} - -type ValidatorGteFloat64Struct struct { - Field float64 `validate:"gte=12.34"` -} - -type ValidGenLtIntStruct struct { - Field int `valid:"lt=32"` -} - -type ValidatorLtIntStruct struct { - Field int `validate:"lt=32"` -} - -type ValidGenLtInt8Struct struct { - Field int8 `valid:"lt=32"` -} - -type ValidatorLtInt8Struct struct { - Field int8 `validate:"lt=32"` -} - -type ValidGenLtInt16Struct struct { - Field int16 `valid:"lt=32"` -} - -type ValidatorLtInt16Struct struct { - Field int16 `validate:"lt=32"` -} - -type ValidGenLtInt32Struct struct { - Field int32 `valid:"lt=32"` -} - -type ValidatorLtInt32Struct struct { - Field int32 `validate:"lt=32"` -} - -type ValidGenLtInt64Struct struct { - Field int64 `valid:"lt=32"` -} - -type ValidatorLtInt64Struct struct { - Field int64 `validate:"lt=32"` -} - -type ValidGenLtUintStruct struct { - Field uint `valid:"lt=32"` -} - -type ValidatorLtUintStruct struct { - Field uint `validate:"lt=32"` -} - -type ValidGenLtUint8Struct struct { - Field uint8 `valid:"lt=32"` -} - -type ValidatorLtUint8Struct struct { - Field uint8 `validate:"lt=32"` -} - -type ValidGenLtUint16Struct struct { - Field uint16 `valid:"lt=32"` -} - -type ValidatorLtUint16Struct struct { - Field uint16 `validate:"lt=32"` -} - -type ValidGenLtUint32Struct struct { - Field uint32 `valid:"lt=32"` -} - -type ValidatorLtUint32Struct struct { - Field uint32 `validate:"lt=32"` -} - -type ValidGenLtUint64Struct struct { - Field uint64 `valid:"lt=32"` -} - -type ValidatorLtUint64Struct struct { - Field uint64 `validate:"lt=32"` -} - -type ValidGenLtFloat32Struct struct { - Field float32 `valid:"lt=12.34"` -} - -type ValidatorLtFloat32Struct struct { - Field float32 `validate:"lt=12.34"` -} - -type ValidGenLtFloat64Struct struct { - Field float64 `valid:"lt=12.34"` -} - -type ValidatorLtFloat64Struct struct { - Field float64 `validate:"lt=12.34"` -} - -type ValidGenLteIntStruct struct { - Field int `valid:"lte=32"` -} - -type ValidatorLteIntStruct struct { - Field int `validate:"lte=32"` -} - -type ValidGenLteInt8Struct struct { - Field int8 `valid:"lte=32"` -} - -type ValidatorLteInt8Struct struct { - Field int8 `validate:"lte=32"` -} - -type ValidGenLteInt16Struct struct { - Field int16 `valid:"lte=32"` -} - -type ValidatorLteInt16Struct struct { - Field int16 `validate:"lte=32"` -} - -type ValidGenLteInt32Struct struct { - Field int32 `valid:"lte=32"` -} - -type ValidatorLteInt32Struct struct { - Field int32 `validate:"lte=32"` -} - -type ValidGenLteInt64Struct struct { - Field int64 `valid:"lte=32"` -} - -type ValidatorLteInt64Struct struct { - Field int64 `validate:"lte=32"` -} - -type ValidGenLteUintStruct struct { - Field uint `valid:"lte=32"` -} - -type ValidatorLteUintStruct struct { - Field uint `validate:"lte=32"` -} - -type ValidGenLteUint8Struct struct { - Field uint8 `valid:"lte=32"` -} - -type ValidatorLteUint8Struct struct { - Field uint8 `validate:"lte=32"` -} - -type ValidGenLteUint16Struct struct { - Field uint16 `valid:"lte=32"` -} - -type ValidatorLteUint16Struct struct { - Field uint16 `validate:"lte=32"` -} - -type ValidGenLteUint32Struct struct { - Field uint32 `valid:"lte=32"` -} - -type ValidatorLteUint32Struct struct { - Field uint32 `validate:"lte=32"` -} - -type ValidGenLteUint64Struct struct { - Field uint64 `valid:"lte=32"` -} - -type ValidatorLteUint64Struct struct { - Field uint64 `validate:"lte=32"` -} - -type ValidGenLteFloat32Struct struct { - Field float32 `valid:"lte=12.34"` -} - -type ValidatorLteFloat32Struct struct { - Field float32 `validate:"lte=12.34"` -} - -type ValidGenLteFloat64Struct struct { - Field float64 `valid:"lte=12.34"` -} - -type ValidatorLteFloat64Struct struct { - Field float64 `validate:"lte=12.34"` -} - -type ValidGenMinStringStruct struct { - Field string `valid:"min=5"` -} - -type ValidatorMinStringStruct struct { - Field string `validate:"min=5"` -} - -type ValidGenMinStringSliceStruct struct { - Field []string `valid:"min=2"` -} - -type ValidatorMinStringSliceStruct struct { - Field []string `validate:"min=2"` -} - -type ValidGenMinIntSliceStruct struct { - Field []int `valid:"min=2"` -} - -type ValidatorMinIntSliceStruct struct { - Field []int `validate:"min=2"` -} - -type ValidGenMinInt8SliceStruct struct { - Field []int8 `valid:"min=2"` -} - -type ValidatorMinInt8SliceStruct struct { - Field []int8 `validate:"min=2"` -} - -type ValidGenMinInt16SliceStruct struct { - Field []int16 `valid:"min=2"` -} - -type ValidatorMinInt16SliceStruct struct { - Field []int16 `validate:"min=2"` -} - -type ValidGenMinInt32SliceStruct struct { - Field []int32 `valid:"min=2"` -} - -type ValidatorMinInt32SliceStruct struct { - Field []int32 `validate:"min=2"` -} - -type ValidGenMinInt64SliceStruct struct { - Field []int64 `valid:"min=2"` -} - -type ValidatorMinInt64SliceStruct struct { - Field []int64 `validate:"min=2"` -} - -type ValidGenMinUintSliceStruct struct { - Field []uint `valid:"min=2"` -} - -type ValidatorMinUintSliceStruct struct { - Field []uint `validate:"min=2"` -} - -type ValidGenMinUint8SliceStruct struct { - Field []uint8 `valid:"min=2"` -} - -type ValidatorMinUint8SliceStruct struct { - Field []uint8 `validate:"min=2"` -} - -type ValidGenMinUint16SliceStruct struct { - Field []uint16 `valid:"min=2"` -} - -type ValidatorMinUint16SliceStruct struct { - Field []uint16 `validate:"min=2"` -} - -type ValidGenMinUint32SliceStruct struct { - Field []uint32 `valid:"min=2"` -} - -type ValidatorMinUint32SliceStruct struct { - Field []uint32 `validate:"min=2"` -} - -type ValidGenMinUint64SliceStruct struct { - Field []uint64 `valid:"min=2"` -} - -type ValidatorMinUint64SliceStruct struct { - Field []uint64 `validate:"min=2"` -} - -type ValidGenMinFloat32SliceStruct struct { - Field []float32 `valid:"min=2"` -} - -type ValidatorMinFloat32SliceStruct struct { - Field []float32 `validate:"min=2"` -} - -type ValidGenMinFloat64SliceStruct struct { - Field []float64 `valid:"min=2"` -} - -type ValidatorMinFloat64SliceStruct struct { - Field []float64 `validate:"min=2"` -} - -type ValidGenMinBoolSliceStruct struct { - Field []bool `valid:"min=2"` -} - -type ValidatorMinBoolSliceStruct struct { - Field []bool `validate:"min=2"` -} - -type ValidGenMinStringMapStruct struct { - Field map[string]string `valid:"min=2"` -} - -type ValidatorMinStringMapStruct struct { - Field map[string]string `validate:"min=2"` -} - -type ValidGenMinIntMapStruct struct { - Field map[int]int `valid:"min=2"` -} - -type ValidatorMinIntMapStruct struct { - Field map[int]int `validate:"min=2"` -} - -type ValidGenMinInt8MapStruct struct { - Field map[int8]int8 `valid:"min=2"` -} - -type ValidatorMinInt8MapStruct struct { - Field map[int8]int8 `validate:"min=2"` -} - -type ValidGenMinInt16MapStruct struct { - Field map[int16]int16 `valid:"min=2"` -} - -type ValidatorMinInt16MapStruct struct { - Field map[int16]int16 `validate:"min=2"` -} - -type ValidGenMinInt32MapStruct struct { - Field map[int32]int32 `valid:"min=2"` -} - -type ValidatorMinInt32MapStruct struct { - Field map[int32]int32 `validate:"min=2"` -} - -type ValidGenMinInt64MapStruct struct { - Field map[int64]int64 `valid:"min=2"` -} - -type ValidatorMinInt64MapStruct struct { - Field map[int64]int64 `validate:"min=2"` -} - -type ValidGenMinUintMapStruct struct { - Field map[uint]uint `valid:"min=2"` -} - -type ValidatorMinUintMapStruct struct { - Field map[uint]uint `validate:"min=2"` -} - -type ValidGenMinUint8MapStruct struct { - Field map[uint8]uint8 `valid:"min=2"` -} - -type ValidatorMinUint8MapStruct struct { - Field map[uint8]uint8 `validate:"min=2"` -} - -type ValidGenMinUint16MapStruct struct { - Field map[uint16]uint16 `valid:"min=2"` -} - -type ValidatorMinUint16MapStruct struct { - Field map[uint16]uint16 `validate:"min=2"` -} - -type ValidGenMinUint32MapStruct struct { - Field map[uint32]uint32 `valid:"min=2"` -} - -type ValidatorMinUint32MapStruct struct { - Field map[uint32]uint32 `validate:"min=2"` -} - -type ValidGenMinUint64MapStruct struct { - Field map[uint64]uint64 `valid:"min=2"` -} - -type ValidatorMinUint64MapStruct struct { - Field map[uint64]uint64 `validate:"min=2"` -} - -type ValidGenMinFloat32MapStruct struct { - Field map[float32]float32 `valid:"min=2"` -} - -type ValidatorMinFloat32MapStruct struct { - Field map[float32]float32 `validate:"min=2"` -} - -type ValidGenMinFloat64MapStruct struct { - Field map[float64]float64 `valid:"min=2"` -} - -type ValidatorMinFloat64MapStruct struct { - Field map[float64]float64 `validate:"min=2"` -} - -type ValidGenMinBoolMapStruct struct { - Field map[bool]bool `valid:"min=2"` -} - -type ValidatorMinBoolMapStruct struct { - Field map[bool]bool `validate:"min=2"` -} - -type ValidGenMaxStringStruct struct { - Field string `valid:"max=3"` -} - -type ValidatorMaxStringStruct struct { - Field string `validate:"max=3"` -} - -type ValidGenMaxStringSliceStruct struct { - Field []string `valid:"max=2"` -} - -type ValidatorMaxStringSliceStruct struct { - Field []string `validate:"max=2"` -} - -type ValidGenMaxIntSliceStruct struct { - Field []int `valid:"max=2"` -} - -type ValidatorMaxIntSliceStruct struct { - Field []int `validate:"max=2"` -} - -type ValidGenMaxInt8SliceStruct struct { - Field []int8 `valid:"max=2"` -} - -type ValidatorMaxInt8SliceStruct struct { - Field []int8 `validate:"max=2"` -} - -type ValidGenMaxInt16SliceStruct struct { - Field []int16 `valid:"max=2"` -} - -type ValidatorMaxInt16SliceStruct struct { - Field []int16 `validate:"max=2"` -} - -type ValidGenMaxInt32SliceStruct struct { - Field []int32 `valid:"max=2"` -} - -type ValidatorMaxInt32SliceStruct struct { - Field []int32 `validate:"max=2"` -} - -type ValidGenMaxInt64SliceStruct struct { - Field []int64 `valid:"max=2"` -} - -type ValidatorMaxInt64SliceStruct struct { - Field []int64 `validate:"max=2"` -} - -type ValidGenMaxUintSliceStruct struct { - Field []uint `valid:"max=2"` -} - -type ValidatorMaxUintSliceStruct struct { - Field []uint `validate:"max=2"` -} - -type ValidGenMaxUint8SliceStruct struct { - Field []uint8 `valid:"max=2"` -} - -type ValidatorMaxUint8SliceStruct struct { - Field []uint8 `validate:"max=2"` -} - -type ValidGenMaxUint16SliceStruct struct { - Field []uint16 `valid:"max=2"` -} - -type ValidatorMaxUint16SliceStruct struct { - Field []uint16 `validate:"max=2"` -} - -type ValidGenMaxUint32SliceStruct struct { - Field []uint32 `valid:"max=2"` -} - -type ValidatorMaxUint32SliceStruct struct { - Field []uint32 `validate:"max=2"` -} - -type ValidGenMaxUint64SliceStruct struct { - Field []uint64 `valid:"max=2"` -} - -type ValidatorMaxUint64SliceStruct struct { - Field []uint64 `validate:"max=2"` -} - -type ValidGenMaxFloat32SliceStruct struct { - Field []float32 `valid:"max=2"` -} - -type ValidatorMaxFloat32SliceStruct struct { - Field []float32 `validate:"max=2"` -} - -type ValidGenMaxFloat64SliceStruct struct { - Field []float64 `valid:"max=2"` -} - -type ValidatorMaxFloat64SliceStruct struct { - Field []float64 `validate:"max=2"` -} - -type ValidGenMaxBoolSliceStruct struct { - Field []bool `valid:"max=2"` -} - -type ValidatorMaxBoolSliceStruct struct { - Field []bool `validate:"max=2"` -} - -type ValidGenMaxStringMapStruct struct { - Field map[string]string `valid:"max=2"` -} - -type ValidatorMaxStringMapStruct struct { - Field map[string]string `validate:"max=2"` -} - -type ValidGenMaxIntMapStruct struct { - Field map[int]int `valid:"max=2"` -} - -type ValidatorMaxIntMapStruct struct { - Field map[int]int `validate:"max=2"` -} - -type ValidGenMaxInt8MapStruct struct { - Field map[int8]int8 `valid:"max=2"` -} - -type ValidatorMaxInt8MapStruct struct { - Field map[int8]int8 `validate:"max=2"` -} - -type ValidGenMaxInt16MapStruct struct { - Field map[int16]int16 `valid:"max=2"` -} - -type ValidatorMaxInt16MapStruct struct { - Field map[int16]int16 `validate:"max=2"` -} - -type ValidGenMaxInt32MapStruct struct { - Field map[int32]int32 `valid:"max=2"` -} - -type ValidatorMaxInt32MapStruct struct { - Field map[int32]int32 `validate:"max=2"` -} - -type ValidGenMaxInt64MapStruct struct { - Field map[int64]int64 `valid:"max=2"` -} - -type ValidatorMaxInt64MapStruct struct { - Field map[int64]int64 `validate:"max=2"` -} - -type ValidGenMaxUintMapStruct struct { - Field map[uint]uint `valid:"max=2"` -} - -type ValidatorMaxUintMapStruct struct { - Field map[uint]uint `validate:"max=2"` -} - -type ValidGenMaxUint8MapStruct struct { - Field map[uint8]uint8 `valid:"max=2"` -} - -type ValidatorMaxUint8MapStruct struct { - Field map[uint8]uint8 `validate:"max=2"` -} - -type ValidGenMaxUint16MapStruct struct { - Field map[uint16]uint16 `valid:"max=2"` -} - -type ValidatorMaxUint16MapStruct struct { - Field map[uint16]uint16 `validate:"max=2"` -} - -type ValidGenMaxUint32MapStruct struct { - Field map[uint32]uint32 `valid:"max=2"` -} - -type ValidatorMaxUint32MapStruct struct { - Field map[uint32]uint32 `validate:"max=2"` -} - -type ValidGenMaxUint64MapStruct struct { - Field map[uint64]uint64 `valid:"max=2"` -} - -type ValidatorMaxUint64MapStruct struct { - Field map[uint64]uint64 `validate:"max=2"` -} - -type ValidGenMaxFloat32MapStruct struct { - Field map[float32]float32 `valid:"max=2"` -} - -type ValidatorMaxFloat32MapStruct struct { - Field map[float32]float32 `validate:"max=2"` -} - -type ValidGenMaxFloat64MapStruct struct { - Field map[float64]float64 `valid:"max=2"` -} - -type ValidatorMaxFloat64MapStruct struct { - Field map[float64]float64 `validate:"max=2"` -} - -type ValidGenMaxBoolMapStruct struct { - Field map[bool]bool `valid:"max=1"` -} - -type ValidatorMaxBoolMapStruct struct { - Field map[bool]bool `validate:"max=1"` -} - -type ValidGenEq_ignore_caseStringStruct struct { - Field string `valid:"eq_ignore_case=abcde"` -} - -type ValidatorEq_ignore_caseStringStruct struct { - Field string `validate:"eq_ignore_case=abcde"` -} - -type ValidGenNeq_ignore_caseStringStruct struct { - Field string `valid:"neq_ignore_case=abcde"` -} - -type ValidatorNeq_ignore_caseStringStruct struct { - Field string `validate:"ne_ignore_case=abcde"` -} - -type ValidGenLenStringStruct struct { - Field string `valid:"len=2"` -} - -type ValidatorLenStringStruct struct { - Field string `validate:"len=2"` -} - -type ValidGenLenStringSliceStruct struct { - Field []string `valid:"len=2"` -} - -type ValidatorLenStringSliceStruct struct { - Field []string `validate:"len=2"` -} - -type ValidGenLenIntSliceStruct struct { - Field []int `valid:"len=2"` -} - -type ValidatorLenIntSliceStruct struct { - Field []int `validate:"len=2"` -} - -type ValidGenLenInt8SliceStruct struct { - Field []int8 `valid:"len=2"` -} - -type ValidatorLenInt8SliceStruct struct { - Field []int8 `validate:"len=2"` -} - -type ValidGenLenInt16SliceStruct struct { - Field []int16 `valid:"len=2"` -} - -type ValidatorLenInt16SliceStruct struct { - Field []int16 `validate:"len=2"` -} - -type ValidGenLenInt32SliceStruct struct { - Field []int32 `valid:"len=2"` -} - -type ValidatorLenInt32SliceStruct struct { - Field []int32 `validate:"len=2"` -} - -type ValidGenLenInt64SliceStruct struct { - Field []int64 `valid:"len=2"` -} - -type ValidatorLenInt64SliceStruct struct { - Field []int64 `validate:"len=2"` -} - -type ValidGenLenUintSliceStruct struct { - Field []uint `valid:"len=2"` -} - -type ValidatorLenUintSliceStruct struct { - Field []uint `validate:"len=2"` -} - -type ValidGenLenUint8SliceStruct struct { - Field []uint8 `valid:"len=2"` -} - -type ValidatorLenUint8SliceStruct struct { - Field []uint8 `validate:"len=2"` -} - -type ValidGenLenUint16SliceStruct struct { - Field []uint16 `valid:"len=2"` -} - -type ValidatorLenUint16SliceStruct struct { - Field []uint16 `validate:"len=2"` -} - -type ValidGenLenUint32SliceStruct struct { - Field []uint32 `valid:"len=2"` -} - -type ValidatorLenUint32SliceStruct struct { - Field []uint32 `validate:"len=2"` -} - -type ValidGenLenUint64SliceStruct struct { - Field []uint64 `valid:"len=2"` -} - -type ValidatorLenUint64SliceStruct struct { - Field []uint64 `validate:"len=2"` -} - -type ValidGenLenFloat32SliceStruct struct { - Field []float32 `valid:"len=2"` -} - -type ValidatorLenFloat32SliceStruct struct { - Field []float32 `validate:"len=2"` -} - -type ValidGenLenFloat64SliceStruct struct { - Field []float64 `valid:"len=2"` -} - -type ValidatorLenFloat64SliceStruct struct { - Field []float64 `validate:"len=2"` -} - -type ValidGenLenBoolSliceStruct struct { - Field []bool `valid:"len=2"` -} - -type ValidatorLenBoolSliceStruct struct { - Field []bool `validate:"len=2"` -} - -type ValidGenLenStringMapStruct struct { - Field map[string]string `valid:"len=2"` -} - -type ValidatorLenStringMapStruct struct { - Field map[string]string `validate:"len=2"` -} - -type ValidGenLenIntMapStruct struct { - Field map[int]int `valid:"len=2"` -} - -type ValidatorLenIntMapStruct struct { - Field map[int]int `validate:"len=2"` -} - -type ValidGenLenInt8MapStruct struct { - Field map[int8]int8 `valid:"len=2"` -} - -type ValidatorLenInt8MapStruct struct { - Field map[int8]int8 `validate:"len=2"` -} - -type ValidGenLenInt16MapStruct struct { - Field map[int16]int16 `valid:"len=2"` -} - -type ValidatorLenInt16MapStruct struct { - Field map[int16]int16 `validate:"len=2"` -} - -type ValidGenLenInt32MapStruct struct { - Field map[int32]int32 `valid:"len=2"` -} - -type ValidatorLenInt32MapStruct struct { - Field map[int32]int32 `validate:"len=2"` -} - -type ValidGenLenInt64MapStruct struct { - Field map[int64]int64 `valid:"len=2"` -} - -type ValidatorLenInt64MapStruct struct { - Field map[int64]int64 `validate:"len=2"` -} - -type ValidGenLenUintMapStruct struct { - Field map[uint]uint `valid:"len=2"` -} - -type ValidatorLenUintMapStruct struct { - Field map[uint]uint `validate:"len=2"` -} - -type ValidGenLenUint8MapStruct struct { - Field map[uint8]uint8 `valid:"len=2"` -} - -type ValidatorLenUint8MapStruct struct { - Field map[uint8]uint8 `validate:"len=2"` -} - -type ValidGenLenUint16MapStruct struct { - Field map[uint16]uint16 `valid:"len=2"` -} - -type ValidatorLenUint16MapStruct struct { - Field map[uint16]uint16 `validate:"len=2"` -} - -type ValidGenLenUint32MapStruct struct { - Field map[uint32]uint32 `valid:"len=2"` -} - -type ValidatorLenUint32MapStruct struct { - Field map[uint32]uint32 `validate:"len=2"` -} - -type ValidGenLenUint64MapStruct struct { - Field map[uint64]uint64 `valid:"len=2"` -} - -type ValidatorLenUint64MapStruct struct { - Field map[uint64]uint64 `validate:"len=2"` -} - -type ValidGenLenFloat32MapStruct struct { - Field map[float32]float32 `valid:"len=2"` -} - -type ValidatorLenFloat32MapStruct struct { - Field map[float32]float32 `validate:"len=2"` -} - -type ValidGenLenFloat64MapStruct struct { - Field map[float64]float64 `valid:"len=2"` -} - -type ValidatorLenFloat64MapStruct struct { - Field map[float64]float64 `validate:"len=2"` -} - -type ValidGenLenBoolMapStruct struct { - Field map[bool]bool `valid:"len=2"` -} - -type ValidatorLenBoolMapStruct struct { - Field map[bool]bool `validate:"len=2"` -} - -type ValidGenInStringStruct struct { - Field string `valid:"in=ab cd ef"` -} - -type ValidatorInStringStruct struct { - Field string `validate:"oneof=ab cd ef"` -} - -type ValidGenInIntStruct struct { - Field int `valid:"in=12 34 56"` -} - -type ValidatorInIntStruct struct { - Field int `validate:"oneof=12 34 56"` -} - -type ValidGenInInt8Struct struct { - Field int8 `valid:"in=12 34 56"` -} - -type ValidatorInInt8Struct struct { - Field int8 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt16Struct struct { - Field int16 `valid:"in=12 34 56"` -} - -type ValidatorInInt16Struct struct { - Field int16 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt32Struct struct { - Field int32 `valid:"in=12 34 56"` -} - -type ValidatorInInt32Struct struct { - Field int32 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt64Struct struct { - Field int64 `valid:"in=12 34 56"` -} - -type ValidatorInInt64Struct struct { - Field int64 `validate:"oneof=12 34 56"` -} - -type ValidGenInUintStruct struct { - Field uint `valid:"in=12 34 56"` -} - -type ValidatorInUintStruct struct { - Field uint `validate:"oneof=12 34 56"` -} - -type ValidGenInUint8Struct struct { - Field uint8 `valid:"in=12 34 56"` -} - -type ValidatorInUint8Struct struct { - Field uint8 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint16Struct struct { - Field uint16 `valid:"in=12 34 56"` -} - -type ValidatorInUint16Struct struct { - Field uint16 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint32Struct struct { - Field uint32 `valid:"in=12 34 56"` -} - -type ValidatorInUint32Struct struct { - Field uint32 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint64Struct struct { - Field uint64 `valid:"in=12 34 56"` -} - -type ValidatorInUint64Struct struct { - Field uint64 `validate:"oneof=12 34 56"` -} - -func BenchmarkValidGenEmailString(b *testing.B) { - data := &ValidGenEmailStringStruct{ - Field: "abcde@example.com", - } - - for b.Loop() { - if err := ValidGenEmailStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEmailString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEmailStringStruct{ - Field: "abcde@example.com", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredString(b *testing.B) { - data := &ValidGenRequiredStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := ValidGenRequiredStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt(b *testing.B) { - data := &ValidGenRequiredIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8(b *testing.B) { - data := &ValidGenRequiredInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16(b *testing.B) { - data := &ValidGenRequiredInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32(b *testing.B) { - data := &ValidGenRequiredInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64(b *testing.B) { - data := &ValidGenRequiredInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint(b *testing.B) { - data := &ValidGenRequiredUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8(b *testing.B) { - data := &ValidGenRequiredUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16(b *testing.B) { - data := &ValidGenRequiredUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32(b *testing.B) { - data := &ValidGenRequiredUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64(b *testing.B) { - data := &ValidGenRequiredUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenRequiredUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32(b *testing.B) { - data := &ValidGenRequiredFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64(b *testing.B) { - data := &ValidGenRequiredFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBool(b *testing.B) { - data := &ValidGenRequiredBoolStruct{ - Field: true, - } - - for b.Loop() { - if err := ValidGenRequiredBoolStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBool(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredBoolStruct{ - Field: true, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringSlice(b *testing.B) { - data := &ValidGenRequiredStringSliceStruct{ - Field: []string{"abcde"}, - } - - for b.Loop() { - if err := ValidGenRequiredStringSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredStringSliceStruct{ - Field: []string{"abcde"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntSlice(b *testing.B) { - data := &ValidGenRequiredIntSliceStruct{ - Field: []int{32}, - } - - for b.Loop() { - if err := ValidGenRequiredIntSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredIntSliceStruct{ - Field: []int{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8Slice(b *testing.B) { - data := &ValidGenRequiredInt8SliceStruct{ - Field: []int8{32}, - } - - for b.Loop() { - if err := ValidGenRequiredInt8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt8SliceStruct{ - Field: []int8{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16Slice(b *testing.B) { - data := &ValidGenRequiredInt16SliceStruct{ - Field: []int16{32}, - } - - for b.Loop() { - if err := ValidGenRequiredInt16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt16SliceStruct{ - Field: []int16{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32Slice(b *testing.B) { - data := &ValidGenRequiredInt32SliceStruct{ - Field: []int32{32}, - } - - for b.Loop() { - if err := ValidGenRequiredInt32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt32SliceStruct{ - Field: []int32{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64Slice(b *testing.B) { - data := &ValidGenRequiredInt64SliceStruct{ - Field: []int64{32}, - } - - for b.Loop() { - if err := ValidGenRequiredInt64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt64SliceStruct{ - Field: []int64{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintSlice(b *testing.B) { - data := &ValidGenRequiredUintSliceStruct{ - Field: []uint{32}, - } - - for b.Loop() { - if err := ValidGenRequiredUintSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUintSliceStruct{ - Field: []uint{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8Slice(b *testing.B) { - data := &ValidGenRequiredUint8SliceStruct{ - Field: []uint8{32}, - } - - for b.Loop() { - if err := ValidGenRequiredUint8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint8SliceStruct{ - Field: []uint8{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16Slice(b *testing.B) { - data := &ValidGenRequiredUint16SliceStruct{ - Field: []uint16{32}, - } - - for b.Loop() { - if err := ValidGenRequiredUint16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint16SliceStruct{ - Field: []uint16{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32Slice(b *testing.B) { - data := &ValidGenRequiredUint32SliceStruct{ - Field: []uint32{32}, - } - - for b.Loop() { - if err := ValidGenRequiredUint32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint32SliceStruct{ - Field: []uint32{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64Slice(b *testing.B) { - data := &ValidGenRequiredUint64SliceStruct{ - Field: []uint64{32}, - } - - for b.Loop() { - if err := ValidGenRequiredUint64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint64SliceStruct{ - Field: []uint64{32}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32Slice(b *testing.B) { - data := &ValidGenRequiredFloat32SliceStruct{ - Field: []float32{12.34}, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat32SliceStruct{ - Field: []float32{12.34}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64Slice(b *testing.B) { - data := &ValidGenRequiredFloat64SliceStruct{ - Field: []float64{12.34}, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat64SliceStruct{ - Field: []float64{12.34}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolSlice(b *testing.B) { - data := &ValidGenRequiredBoolSliceStruct{ - Field: []bool{true}, - } - - for b.Loop() { - if err := ValidGenRequiredBoolSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredBoolSliceStruct{ - Field: []bool{true}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringMap(b *testing.B) { - data := &ValidGenRequiredStringMapStruct{ - Field: map[string]string{"abcde": "value"}, - } - - for b.Loop() { - if err := ValidGenRequiredStringMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredStringMapStruct{ - Field: map[string]string{"abcde": "value"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntMap(b *testing.B) { - data := &ValidGenRequiredIntMapStruct{ - Field: map[int]int{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredIntMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredIntMapStruct{ - Field: map[int]int{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8Map(b *testing.B) { - data := &ValidGenRequiredInt8MapStruct{ - Field: map[int8]int8{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredInt8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt8MapStruct{ - Field: map[int8]int8{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16Map(b *testing.B) { - data := &ValidGenRequiredInt16MapStruct{ - Field: map[int16]int16{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredInt16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt16MapStruct{ - Field: map[int16]int16{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32Map(b *testing.B) { - data := &ValidGenRequiredInt32MapStruct{ - Field: map[int32]int32{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredInt32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt32MapStruct{ - Field: map[int32]int32{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64Map(b *testing.B) { - data := &ValidGenRequiredInt64MapStruct{ - Field: map[int64]int64{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredInt64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredInt64MapStruct{ - Field: map[int64]int64{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintMap(b *testing.B) { - data := &ValidGenRequiredUintMapStruct{ - Field: map[uint]uint{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredUintMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUintMapStruct{ - Field: map[uint]uint{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8Map(b *testing.B) { - data := &ValidGenRequiredUint8MapStruct{ - Field: map[uint8]uint8{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredUint8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint8MapStruct{ - Field: map[uint8]uint8{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16Map(b *testing.B) { - data := &ValidGenRequiredUint16MapStruct{ - Field: map[uint16]uint16{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredUint16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint16MapStruct{ - Field: map[uint16]uint16{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32Map(b *testing.B) { - data := &ValidGenRequiredUint32MapStruct{ - Field: map[uint32]uint32{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredUint32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint32MapStruct{ - Field: map[uint32]uint32{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64Map(b *testing.B) { - data := &ValidGenRequiredUint64MapStruct{ - Field: map[uint64]uint64{32: 64}, - } - - for b.Loop() { - if err := ValidGenRequiredUint64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredUint64MapStruct{ - Field: map[uint64]uint64{32: 64}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32Map(b *testing.B) { - data := &ValidGenRequiredFloat32MapStruct{ - Field: map[float32]float32{12.34: 56.78}, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat32MapStruct{ - Field: map[float32]float32{12.34: 56.78}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64Map(b *testing.B) { - data := &ValidGenRequiredFloat64MapStruct{ - Field: map[float64]float64{12.34: 56.78}, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredFloat64MapStruct{ - Field: map[float64]float64{12.34: 56.78}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolMap(b *testing.B) { - data := &ValidGenRequiredBoolMapStruct{ - Field: map[bool]bool{true: true}, - } - - for b.Loop() { - if err := ValidGenRequiredBoolMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorRequiredBoolMapStruct{ - Field: map[bool]bool{true: true}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqString(b *testing.B) { - data := &ValidGenEqStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := ValidGenEqStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt(b *testing.B) { - data := &ValidGenEqIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt8(b *testing.B) { - data := &ValidGenEqInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt16(b *testing.B) { - data := &ValidGenEqInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt32(b *testing.B) { - data := &ValidGenEqInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt64(b *testing.B) { - data := &ValidGenEqInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint(b *testing.B) { - data := &ValidGenEqUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint8(b *testing.B) { - data := &ValidGenEqUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint16(b *testing.B) { - data := &ValidGenEqUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint32(b *testing.B) { - data := &ValidGenEqUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint64(b *testing.B) { - data := &ValidGenEqUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenEqUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqFloat32(b *testing.B) { - data := &ValidGenEqFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenEqFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqFloat64(b *testing.B) { - data := &ValidGenEqFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenEqFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqBool(b *testing.B) { - data := &ValidGenEqBoolStruct{ - Field: true, - } - - for b.Loop() { - if err := ValidGenEqBoolStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqBool(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEqBoolStruct{ - Field: true, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqString(b *testing.B) { - data := &ValidGenNeqStringStruct{ - Field: "fghij", - } - - for b.Loop() { - if err := ValidGenNeqStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqStringStruct{ - Field: "fghij", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt(b *testing.B) { - data := &ValidGenNeqIntStruct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqIntStruct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt8(b *testing.B) { - data := &ValidGenNeqInt8Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqInt8Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt16(b *testing.B) { - data := &ValidGenNeqInt16Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqInt16Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt32(b *testing.B) { - data := &ValidGenNeqInt32Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqInt32Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt64(b *testing.B) { - data := &ValidGenNeqInt64Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqInt64Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint(b *testing.B) { - data := &ValidGenNeqUintStruct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqUintStruct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint8(b *testing.B) { - data := &ValidGenNeqUint8Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqUint8Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint16(b *testing.B) { - data := &ValidGenNeqUint16Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqUint16Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint32(b *testing.B) { - data := &ValidGenNeqUint32Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqUint32Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint64(b *testing.B) { - data := &ValidGenNeqUint64Struct{ - Field: 64, - } - - for b.Loop() { - if err := ValidGenNeqUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqUint64Struct{ - Field: 64, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqFloat32(b *testing.B) { - data := &ValidGenNeqFloat32Struct{ - Field: 34.56, - } - - for b.Loop() { - if err := ValidGenNeqFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqFloat32Struct{ - Field: 34.56, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqFloat64(b *testing.B) { - data := &ValidGenNeqFloat64Struct{ - Field: 34.56, - } - - for b.Loop() { - if err := ValidGenNeqFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqFloat64Struct{ - Field: 34.56, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqBool(b *testing.B) { - data := &ValidGenNeqBoolStruct{ - Field: false, - } - - for b.Loop() { - if err := ValidGenNeqBoolStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqBool(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeqBoolStruct{ - Field: false, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt(b *testing.B) { - data := &ValidGenGtIntStruct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtIntStruct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt8(b *testing.B) { - data := &ValidGenGtInt8Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtInt8Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt16(b *testing.B) { - data := &ValidGenGtInt16Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtInt16Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt32(b *testing.B) { - data := &ValidGenGtInt32Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtInt32Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt64(b *testing.B) { - data := &ValidGenGtInt64Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtInt64Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint(b *testing.B) { - data := &ValidGenGtUintStruct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtUintStruct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint8(b *testing.B) { - data := &ValidGenGtUint8Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtUint8Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint16(b *testing.B) { - data := &ValidGenGtUint16Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtUint16Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint32(b *testing.B) { - data := &ValidGenGtUint32Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtUint32Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint64(b *testing.B) { - data := &ValidGenGtUint64Struct{ - Field: 33, - } - - for b.Loop() { - if err := ValidGenGtUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtUint64Struct{ - Field: 33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtFloat32(b *testing.B) { - data := &ValidGenGtFloat32Struct{ - Field: 12.35, - } - - for b.Loop() { - if err := ValidGenGtFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtFloat32Struct{ - Field: 12.35, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtFloat64(b *testing.B) { - data := &ValidGenGtFloat64Struct{ - Field: 12.35, - } - - for b.Loop() { - if err := ValidGenGtFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGtFloat64Struct{ - Field: 12.35, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt(b *testing.B) { - data := &ValidGenGteIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt8(b *testing.B) { - data := &ValidGenGteInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt16(b *testing.B) { - data := &ValidGenGteInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt32(b *testing.B) { - data := &ValidGenGteInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt64(b *testing.B) { - data := &ValidGenGteInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint(b *testing.B) { - data := &ValidGenGteUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint8(b *testing.B) { - data := &ValidGenGteUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint16(b *testing.B) { - data := &ValidGenGteUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint32(b *testing.B) { - data := &ValidGenGteUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint64(b *testing.B) { - data := &ValidGenGteUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenGteUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteFloat32(b *testing.B) { - data := &ValidGenGteFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenGteFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteFloat64(b *testing.B) { - data := &ValidGenGteFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenGteFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorGteFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt(b *testing.B) { - data := &ValidGenLtIntStruct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtIntStruct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt8(b *testing.B) { - data := &ValidGenLtInt8Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtInt8Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt16(b *testing.B) { - data := &ValidGenLtInt16Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtInt16Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt32(b *testing.B) { - data := &ValidGenLtInt32Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtInt32Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt64(b *testing.B) { - data := &ValidGenLtInt64Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtInt64Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint(b *testing.B) { - data := &ValidGenLtUintStruct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtUintStruct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint8(b *testing.B) { - data := &ValidGenLtUint8Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtUint8Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint16(b *testing.B) { - data := &ValidGenLtUint16Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtUint16Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint32(b *testing.B) { - data := &ValidGenLtUint32Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtUint32Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint64(b *testing.B) { - data := &ValidGenLtUint64Struct{ - Field: 31, - } - - for b.Loop() { - if err := ValidGenLtUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtUint64Struct{ - Field: 31, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtFloat32(b *testing.B) { - data := &ValidGenLtFloat32Struct{ - Field: 12.33, - } - - for b.Loop() { - if err := ValidGenLtFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtFloat32Struct{ - Field: 12.33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtFloat64(b *testing.B) { - data := &ValidGenLtFloat64Struct{ - Field: 12.33, - } - - for b.Loop() { - if err := ValidGenLtFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLtFloat64Struct{ - Field: 12.33, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt(b *testing.B) { - data := &ValidGenLteIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteIntStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt8(b *testing.B) { - data := &ValidGenLteInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteInt8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt16(b *testing.B) { - data := &ValidGenLteInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteInt16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt32(b *testing.B) { - data := &ValidGenLteInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteInt32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt64(b *testing.B) { - data := &ValidGenLteInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteInt64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint(b *testing.B) { - data := &ValidGenLteUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteUintStruct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint8(b *testing.B) { - data := &ValidGenLteUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteUint8Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint16(b *testing.B) { - data := &ValidGenLteUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteUint16Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint32(b *testing.B) { - data := &ValidGenLteUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteUint32Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint64(b *testing.B) { - data := &ValidGenLteUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := ValidGenLteUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteUint64Struct{ - Field: 32, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteFloat32(b *testing.B) { - data := &ValidGenLteFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenLteFloat32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteFloat32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteFloat32Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteFloat64(b *testing.B) { - data := &ValidGenLteFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := ValidGenLteFloat64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteFloat64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLteFloat64Struct{ - Field: 12.34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinString(b *testing.B) { - data := &ValidGenMinStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := ValidGenMinStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinStringStruct{ - Field: "abcde", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinStringSlice(b *testing.B) { - data := &ValidGenMinStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := ValidGenMinStringSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinStringSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinIntSlice(b *testing.B) { - data := &ValidGenMinIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinIntSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinIntSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt8Slice(b *testing.B) { - data := &ValidGenMinInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinInt8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt16Slice(b *testing.B) { - data := &ValidGenMinInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinInt16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt32Slice(b *testing.B) { - data := &ValidGenMinInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinInt32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt64Slice(b *testing.B) { - data := &ValidGenMinInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinInt64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUintSlice(b *testing.B) { - data := &ValidGenMinUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinUintSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUintSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint8Slice(b *testing.B) { - data := &ValidGenMinUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinUint8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint16Slice(b *testing.B) { - data := &ValidGenMinUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinUint16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint32Slice(b *testing.B) { - data := &ValidGenMinUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinUint32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint64Slice(b *testing.B) { - data := &ValidGenMinUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := ValidGenMinUint64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat32Slice(b *testing.B) { - data := &ValidGenMinFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenMinFloat32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat64Slice(b *testing.B) { - data := &ValidGenMinFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenMinFloat64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinBoolSlice(b *testing.B) { - data := &ValidGenMinBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := ValidGenMinBoolSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinBoolSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinStringMap(b *testing.B) { - data := &ValidGenMinStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := ValidGenMinStringMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinStringMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinIntMap(b *testing.B) { - data := &ValidGenMinIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinIntMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinIntMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt8Map(b *testing.B) { - data := &ValidGenMinInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinInt8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt16Map(b *testing.B) { - data := &ValidGenMinInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinInt16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt32Map(b *testing.B) { - data := &ValidGenMinInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinInt32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt64Map(b *testing.B) { - data := &ValidGenMinInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinInt64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUintMap(b *testing.B) { - data := &ValidGenMinUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinUintMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUintMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint8Map(b *testing.B) { - data := &ValidGenMinUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinUint8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint16Map(b *testing.B) { - data := &ValidGenMinUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinUint16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint32Map(b *testing.B) { - data := &ValidGenMinUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinUint32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint64Map(b *testing.B) { - data := &ValidGenMinUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMinUint64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat32Map(b *testing.B) { - data := &ValidGenMinFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenMinFloat32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat64Map(b *testing.B) { - data := &ValidGenMinFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenMinFloat64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinBoolMap(b *testing.B) { - data := &ValidGenMinBoolMapStruct{ - Field: map[bool]bool{true: true, false: false}, - } - - for b.Loop() { - if err := ValidGenMinBoolMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinBoolMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMinBoolMapStruct{ - Field: map[bool]bool{true: true, false: false}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxString(b *testing.B) { - data := &ValidGenMaxStringStruct{ - Field: "abc", - } - - for b.Loop() { - if err := ValidGenMaxStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxStringStruct{ - Field: "abc", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxStringSlice(b *testing.B) { - data := &ValidGenMaxStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := ValidGenMaxStringSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxStringSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxIntSlice(b *testing.B) { - data := &ValidGenMaxIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxIntSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxIntSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt8Slice(b *testing.B) { - data := &ValidGenMaxInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt16Slice(b *testing.B) { - data := &ValidGenMaxInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt32Slice(b *testing.B) { - data := &ValidGenMaxInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt64Slice(b *testing.B) { - data := &ValidGenMaxInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUintSlice(b *testing.B) { - data := &ValidGenMaxUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxUintSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUintSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint8Slice(b *testing.B) { - data := &ValidGenMaxUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint16Slice(b *testing.B) { - data := &ValidGenMaxUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint32Slice(b *testing.B) { - data := &ValidGenMaxUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint64Slice(b *testing.B) { - data := &ValidGenMaxUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat32Slice(b *testing.B) { - data := &ValidGenMaxFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenMaxFloat32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat64Slice(b *testing.B) { - data := &ValidGenMaxFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenMaxFloat64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxBoolSlice(b *testing.B) { - data := &ValidGenMaxBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := ValidGenMaxBoolSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxBoolSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxStringMap(b *testing.B) { - data := &ValidGenMaxStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := ValidGenMaxStringMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxStringMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxIntMap(b *testing.B) { - data := &ValidGenMaxIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxIntMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxIntMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt8Map(b *testing.B) { - data := &ValidGenMaxInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt16Map(b *testing.B) { - data := &ValidGenMaxInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt32Map(b *testing.B) { - data := &ValidGenMaxInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt64Map(b *testing.B) { - data := &ValidGenMaxInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxInt64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUintMap(b *testing.B) { - data := &ValidGenMaxUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxUintMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUintMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint8Map(b *testing.B) { - data := &ValidGenMaxUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint16Map(b *testing.B) { - data := &ValidGenMaxUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint32Map(b *testing.B) { - data := &ValidGenMaxUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint64Map(b *testing.B) { - data := &ValidGenMaxUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenMaxUint64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat32Map(b *testing.B) { - data := &ValidGenMaxFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenMaxFloat32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat64Map(b *testing.B) { - data := &ValidGenMaxFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenMaxFloat64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxBoolMap(b *testing.B) { - data := &ValidGenMaxBoolMapStruct{ - Field: map[bool]bool{true: true}, - } - - for b.Loop() { - if err := ValidGenMaxBoolMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxBoolMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorMaxBoolMapStruct{ - Field: map[bool]bool{true: true}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEq_ignore_caseString(b *testing.B) { - data := &ValidGenEq_ignore_caseStringStruct{ - Field: "AbCdE", - } - - for b.Loop() { - if err := ValidGenEq_ignore_caseStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEq_ignore_caseString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorEq_ignore_caseStringStruct{ - Field: "AbCdE", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeq_ignore_caseString(b *testing.B) { - data := &ValidGenNeq_ignore_caseStringStruct{ - Field: "a1b2c3", - } - - for b.Loop() { - if err := ValidGenNeq_ignore_caseStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeq_ignore_caseString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorNeq_ignore_caseStringStruct{ - Field: "a1b2c3", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenString(b *testing.B) { - data := &ValidGenLenStringStruct{ - Field: "ab", - } - - for b.Loop() { - if err := ValidGenLenStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenStringStruct{ - Field: "ab", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenStringSlice(b *testing.B) { - data := &ValidGenLenStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := ValidGenLenStringSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenStringSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenStringSliceStruct{ - Field: []string{"abc", "def"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenIntSlice(b *testing.B) { - data := &ValidGenLenIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenIntSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenIntSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenIntSliceStruct{ - Field: []int{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt8Slice(b *testing.B) { - data := &ValidGenLenInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenInt8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt8SliceStruct{ - Field: []int8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt16Slice(b *testing.B) { - data := &ValidGenLenInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenInt16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt16SliceStruct{ - Field: []int16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt32Slice(b *testing.B) { - data := &ValidGenLenInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenInt32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt32SliceStruct{ - Field: []int32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt64Slice(b *testing.B) { - data := &ValidGenLenInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenInt64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt64SliceStruct{ - Field: []int64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUintSlice(b *testing.B) { - data := &ValidGenLenUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenUintSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUintSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUintSliceStruct{ - Field: []uint{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint8Slice(b *testing.B) { - data := &ValidGenLenUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenUint8SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint8Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint8SliceStruct{ - Field: []uint8{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint16Slice(b *testing.B) { - data := &ValidGenLenUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenUint16SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint16Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint16SliceStruct{ - Field: []uint16{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint32Slice(b *testing.B) { - data := &ValidGenLenUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenUint32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint32SliceStruct{ - Field: []uint32{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint64Slice(b *testing.B) { - data := &ValidGenLenUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := ValidGenLenUint64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint64SliceStruct{ - Field: []uint64{65, 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat32Slice(b *testing.B) { - data := &ValidGenLenFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenLenFloat32SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat32Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenFloat32SliceStruct{ - Field: []float32{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat64Slice(b *testing.B) { - data := &ValidGenLenFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := ValidGenLenFloat64SliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat64Slice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenFloat64SliceStruct{ - Field: []float64{65.65, 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenBoolSlice(b *testing.B) { - data := &ValidGenLenBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := ValidGenLenBoolSliceStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenBoolSlice(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenBoolSliceStruct{ - Field: []bool{true, false}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenStringMap(b *testing.B) { - data := &ValidGenLenStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := ValidGenLenStringMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenStringMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenStringMapStruct{ - Field: map[string]string{"a": "1", "b": "2"}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenIntMap(b *testing.B) { - data := &ValidGenLenIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenIntMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenIntMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenIntMapStruct{ - Field: map[int]int{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt8Map(b *testing.B) { - data := &ValidGenLenInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenInt8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt8MapStruct{ - Field: map[int8]int8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt16Map(b *testing.B) { - data := &ValidGenLenInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenInt16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt16MapStruct{ - Field: map[int16]int16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt32Map(b *testing.B) { - data := &ValidGenLenInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenInt32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt32MapStruct{ - Field: map[int32]int32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt64Map(b *testing.B) { - data := &ValidGenLenInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenInt64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenInt64MapStruct{ - Field: map[int64]int64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUintMap(b *testing.B) { - data := &ValidGenLenUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenUintMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUintMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUintMapStruct{ - Field: map[uint]uint{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint8Map(b *testing.B) { - data := &ValidGenLenUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenUint8MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint8Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint8MapStruct{ - Field: map[uint8]uint8{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint16Map(b *testing.B) { - data := &ValidGenLenUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenUint16MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint16Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint16MapStruct{ - Field: map[uint16]uint16{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint32Map(b *testing.B) { - data := &ValidGenLenUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenUint32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint32MapStruct{ - Field: map[uint32]uint32{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint64Map(b *testing.B) { - data := &ValidGenLenUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := ValidGenLenUint64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenUint64MapStruct{ - Field: map[uint64]uint64{1: 65, 2: 67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat32Map(b *testing.B) { - data := &ValidGenLenFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenLenFloat32MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat32Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenFloat32MapStruct{ - Field: map[float32]float32{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat64Map(b *testing.B) { - data := &ValidGenLenFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := ValidGenLenFloat64MapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat64Map(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenFloat64MapStruct{ - Field: map[float64]float64{1: 65.65, 2: 67.67}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenBoolMap(b *testing.B) { - data := &ValidGenLenBoolMapStruct{ - Field: map[bool]bool{true: true, false: false}, - } - - for b.Loop() { - if err := ValidGenLenBoolMapStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenBoolMap(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorLenBoolMapStruct{ - Field: map[bool]bool{true: true, false: false}, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInString(b *testing.B) { - data := &ValidGenInStringStruct{ - Field: "cd", - } - - for b.Loop() { - if err := ValidGenInStringStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInString(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInStringStruct{ - Field: "cd", - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt(b *testing.B) { - data := &ValidGenInIntStruct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInIntStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInIntStruct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt8(b *testing.B) { - data := &ValidGenInInt8Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInInt8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInInt8Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt16(b *testing.B) { - data := &ValidGenInInt16Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInInt16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInInt16Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt32(b *testing.B) { - data := &ValidGenInInt32Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInInt32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInInt32Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt64(b *testing.B) { - data := &ValidGenInInt64Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInInt64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInInt64Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint(b *testing.B) { - data := &ValidGenInUintStruct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInUintStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInUintStruct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint8(b *testing.B) { - data := &ValidGenInUint8Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInUint8StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint8(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInUint8Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint16(b *testing.B) { - data := &ValidGenInUint16Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInUint16StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint16(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInUint16Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint32(b *testing.B) { - data := &ValidGenInUint32Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInUint32StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint32(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInUint32Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint64(b *testing.B) { - data := &ValidGenInUint64Struct{ - Field: 34, - } - - for b.Loop() { - if err := ValidGenInUint64StructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint64(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - data := &ValidatorInUint64Struct{ - Field: 34, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} diff --git a/tests/cmpbenchtests/generated_cmp_perf_pointer_test.go b/tests/cmpbenchtests/generated_cmp_perf_pointer_test.go deleted file mode 100644 index 7418317..0000000 --- a/tests/cmpbenchtests/generated_cmp_perf_pointer_test.go +++ /dev/null @@ -1,9096 +0,0 @@ -// Code generated by TestGen. DO NOT EDIT. - -package benchtests - -import ( - "testing" - - "github.com/go-playground/validator/v10" -) - -type ValidGenEmailStringPointerStruct struct { - Field *string `valid:"email"` -} - -type ValidatorEmailStringPointerStruct struct { - Field *string `validate:"email"` -} - -type ValidGenRequiredStringPointerStruct struct { - Field *string `valid:"required"` -} - -type ValidatorRequiredStringPointerStruct struct { - Field *string `validate:"required"` -} - -type ValidGenRequiredIntPointerStruct struct { - Field *int `valid:"required"` -} - -type ValidatorRequiredIntPointerStruct struct { - Field *int `validate:"required"` -} - -type ValidGenRequiredInt8PointerStruct struct { - Field *int8 `valid:"required"` -} - -type ValidatorRequiredInt8PointerStruct struct { - Field *int8 `validate:"required"` -} - -type ValidGenRequiredInt16PointerStruct struct { - Field *int16 `valid:"required"` -} - -type ValidatorRequiredInt16PointerStruct struct { - Field *int16 `validate:"required"` -} - -type ValidGenRequiredInt32PointerStruct struct { - Field *int32 `valid:"required"` -} - -type ValidatorRequiredInt32PointerStruct struct { - Field *int32 `validate:"required"` -} - -type ValidGenRequiredInt64PointerStruct struct { - Field *int64 `valid:"required"` -} - -type ValidatorRequiredInt64PointerStruct struct { - Field *int64 `validate:"required"` -} - -type ValidGenRequiredUintPointerStruct struct { - Field *uint `valid:"required"` -} - -type ValidatorRequiredUintPointerStruct struct { - Field *uint `validate:"required"` -} - -type ValidGenRequiredUint8PointerStruct struct { - Field *uint8 `valid:"required"` -} - -type ValidatorRequiredUint8PointerStruct struct { - Field *uint8 `validate:"required"` -} - -type ValidGenRequiredUint16PointerStruct struct { - Field *uint16 `valid:"required"` -} - -type ValidatorRequiredUint16PointerStruct struct { - Field *uint16 `validate:"required"` -} - -type ValidGenRequiredUint32PointerStruct struct { - Field *uint32 `valid:"required"` -} - -type ValidatorRequiredUint32PointerStruct struct { - Field *uint32 `validate:"required"` -} - -type ValidGenRequiredUint64PointerStruct struct { - Field *uint64 `valid:"required"` -} - -type ValidatorRequiredUint64PointerStruct struct { - Field *uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32PointerStruct struct { - Field *float32 `valid:"required"` -} - -type ValidatorRequiredFloat32PointerStruct struct { - Field *float32 `validate:"required"` -} - -type ValidGenRequiredFloat64PointerStruct struct { - Field *float64 `valid:"required"` -} - -type ValidatorRequiredFloat64PointerStruct struct { - Field *float64 `validate:"required"` -} - -type ValidGenRequiredBoolPointerStruct struct { - Field *bool `valid:"required"` -} - -type ValidatorRequiredBoolPointerStruct struct { - Field *bool `validate:"required"` -} - -type ValidGenRequiredStringSlicePointerStruct struct { - Field *[]string `valid:"required"` -} - -type ValidatorRequiredStringSlicePointerStruct struct { - Field *[]string `validate:"required"` -} - -type ValidGenRequiredIntSlicePointerStruct struct { - Field *[]int `valid:"required"` -} - -type ValidatorRequiredIntSlicePointerStruct struct { - Field *[]int `validate:"required"` -} - -type ValidGenRequiredInt8SlicePointerStruct struct { - Field *[]int8 `valid:"required"` -} - -type ValidatorRequiredInt8SlicePointerStruct struct { - Field *[]int8 `validate:"required"` -} - -type ValidGenRequiredInt16SlicePointerStruct struct { - Field *[]int16 `valid:"required"` -} - -type ValidatorRequiredInt16SlicePointerStruct struct { - Field *[]int16 `validate:"required"` -} - -type ValidGenRequiredInt32SlicePointerStruct struct { - Field *[]int32 `valid:"required"` -} - -type ValidatorRequiredInt32SlicePointerStruct struct { - Field *[]int32 `validate:"required"` -} - -type ValidGenRequiredInt64SlicePointerStruct struct { - Field *[]int64 `valid:"required"` -} - -type ValidatorRequiredInt64SlicePointerStruct struct { - Field *[]int64 `validate:"required"` -} - -type ValidGenRequiredUintSlicePointerStruct struct { - Field *[]uint `valid:"required"` -} - -type ValidatorRequiredUintSlicePointerStruct struct { - Field *[]uint `validate:"required"` -} - -type ValidGenRequiredUint8SlicePointerStruct struct { - Field *[]uint8 `valid:"required"` -} - -type ValidatorRequiredUint8SlicePointerStruct struct { - Field *[]uint8 `validate:"required"` -} - -type ValidGenRequiredUint16SlicePointerStruct struct { - Field *[]uint16 `valid:"required"` -} - -type ValidatorRequiredUint16SlicePointerStruct struct { - Field *[]uint16 `validate:"required"` -} - -type ValidGenRequiredUint32SlicePointerStruct struct { - Field *[]uint32 `valid:"required"` -} - -type ValidatorRequiredUint32SlicePointerStruct struct { - Field *[]uint32 `validate:"required"` -} - -type ValidGenRequiredUint64SlicePointerStruct struct { - Field *[]uint64 `valid:"required"` -} - -type ValidatorRequiredUint64SlicePointerStruct struct { - Field *[]uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32SlicePointerStruct struct { - Field *[]float32 `valid:"required"` -} - -type ValidatorRequiredFloat32SlicePointerStruct struct { - Field *[]float32 `validate:"required"` -} - -type ValidGenRequiredFloat64SlicePointerStruct struct { - Field *[]float64 `valid:"required"` -} - -type ValidatorRequiredFloat64SlicePointerStruct struct { - Field *[]float64 `validate:"required"` -} - -type ValidGenRequiredBoolSlicePointerStruct struct { - Field *[]bool `valid:"required"` -} - -type ValidatorRequiredBoolSlicePointerStruct struct { - Field *[]bool `validate:"required"` -} - -type ValidGenRequiredStringArrayPointerStruct struct { - Field *[3]string `valid:"required"` -} - -type ValidatorRequiredStringArrayPointerStruct struct { - Field *[3]string `validate:"required"` -} - -type ValidGenRequiredIntArrayPointerStruct struct { - Field *[3]int `valid:"required"` -} - -type ValidatorRequiredIntArrayPointerStruct struct { - Field *[3]int `validate:"required"` -} - -type ValidGenRequiredInt8ArrayPointerStruct struct { - Field *[3]int8 `valid:"required"` -} - -type ValidatorRequiredInt8ArrayPointerStruct struct { - Field *[3]int8 `validate:"required"` -} - -type ValidGenRequiredInt16ArrayPointerStruct struct { - Field *[3]int16 `valid:"required"` -} - -type ValidatorRequiredInt16ArrayPointerStruct struct { - Field *[3]int16 `validate:"required"` -} - -type ValidGenRequiredInt32ArrayPointerStruct struct { - Field *[3]int32 `valid:"required"` -} - -type ValidatorRequiredInt32ArrayPointerStruct struct { - Field *[3]int32 `validate:"required"` -} - -type ValidGenRequiredInt64ArrayPointerStruct struct { - Field *[3]int64 `valid:"required"` -} - -type ValidatorRequiredInt64ArrayPointerStruct struct { - Field *[3]int64 `validate:"required"` -} - -type ValidGenRequiredUintArrayPointerStruct struct { - Field *[3]uint `valid:"required"` -} - -type ValidatorRequiredUintArrayPointerStruct struct { - Field *[3]uint `validate:"required"` -} - -type ValidGenRequiredUint8ArrayPointerStruct struct { - Field *[3]uint8 `valid:"required"` -} - -type ValidatorRequiredUint8ArrayPointerStruct struct { - Field *[3]uint8 `validate:"required"` -} - -type ValidGenRequiredUint16ArrayPointerStruct struct { - Field *[3]uint16 `valid:"required"` -} - -type ValidatorRequiredUint16ArrayPointerStruct struct { - Field *[3]uint16 `validate:"required"` -} - -type ValidGenRequiredUint32ArrayPointerStruct struct { - Field *[3]uint32 `valid:"required"` -} - -type ValidatorRequiredUint32ArrayPointerStruct struct { - Field *[3]uint32 `validate:"required"` -} - -type ValidGenRequiredUint64ArrayPointerStruct struct { - Field *[3]uint64 `valid:"required"` -} - -type ValidatorRequiredUint64ArrayPointerStruct struct { - Field *[3]uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32ArrayPointerStruct struct { - Field *[3]float32 `valid:"required"` -} - -type ValidatorRequiredFloat32ArrayPointerStruct struct { - Field *[3]float32 `validate:"required"` -} - -type ValidGenRequiredFloat64ArrayPointerStruct struct { - Field *[3]float64 `valid:"required"` -} - -type ValidatorRequiredFloat64ArrayPointerStruct struct { - Field *[3]float64 `validate:"required"` -} - -type ValidGenRequiredBoolArrayPointerStruct struct { - Field *[3]bool `valid:"required"` -} - -type ValidatorRequiredBoolArrayPointerStruct struct { - Field *[3]bool `validate:"required"` -} - -type ValidGenRequiredStringMapPointerStruct struct { - Field *map[string]string `valid:"required"` -} - -type ValidatorRequiredStringMapPointerStruct struct { - Field *map[string]string `validate:"required"` -} - -type ValidGenRequiredIntMapPointerStruct struct { - Field *map[int]int `valid:"required"` -} - -type ValidatorRequiredIntMapPointerStruct struct { - Field *map[int]int `validate:"required"` -} - -type ValidGenRequiredInt8MapPointerStruct struct { - Field *map[int8]int8 `valid:"required"` -} - -type ValidatorRequiredInt8MapPointerStruct struct { - Field *map[int8]int8 `validate:"required"` -} - -type ValidGenRequiredInt16MapPointerStruct struct { - Field *map[int16]int16 `valid:"required"` -} - -type ValidatorRequiredInt16MapPointerStruct struct { - Field *map[int16]int16 `validate:"required"` -} - -type ValidGenRequiredInt32MapPointerStruct struct { - Field *map[int32]int32 `valid:"required"` -} - -type ValidatorRequiredInt32MapPointerStruct struct { - Field *map[int32]int32 `validate:"required"` -} - -type ValidGenRequiredInt64MapPointerStruct struct { - Field *map[int64]int64 `valid:"required"` -} - -type ValidatorRequiredInt64MapPointerStruct struct { - Field *map[int64]int64 `validate:"required"` -} - -type ValidGenRequiredUintMapPointerStruct struct { - Field *map[uint]uint `valid:"required"` -} - -type ValidatorRequiredUintMapPointerStruct struct { - Field *map[uint]uint `validate:"required"` -} - -type ValidGenRequiredUint8MapPointerStruct struct { - Field *map[uint8]uint8 `valid:"required"` -} - -type ValidatorRequiredUint8MapPointerStruct struct { - Field *map[uint8]uint8 `validate:"required"` -} - -type ValidGenRequiredUint16MapPointerStruct struct { - Field *map[uint16]uint16 `valid:"required"` -} - -type ValidatorRequiredUint16MapPointerStruct struct { - Field *map[uint16]uint16 `validate:"required"` -} - -type ValidGenRequiredUint32MapPointerStruct struct { - Field *map[uint32]uint32 `valid:"required"` -} - -type ValidatorRequiredUint32MapPointerStruct struct { - Field *map[uint32]uint32 `validate:"required"` -} - -type ValidGenRequiredUint64MapPointerStruct struct { - Field *map[uint64]uint64 `valid:"required"` -} - -type ValidatorRequiredUint64MapPointerStruct struct { - Field *map[uint64]uint64 `validate:"required"` -} - -type ValidGenRequiredFloat32MapPointerStruct struct { - Field *map[float32]float32 `valid:"required"` -} - -type ValidatorRequiredFloat32MapPointerStruct struct { - Field *map[float32]float32 `validate:"required"` -} - -type ValidGenRequiredFloat64MapPointerStruct struct { - Field *map[float64]float64 `valid:"required"` -} - -type ValidatorRequiredFloat64MapPointerStruct struct { - Field *map[float64]float64 `validate:"required"` -} - -type ValidGenRequiredBoolMapPointerStruct struct { - Field *map[bool]bool `valid:"required"` -} - -type ValidatorRequiredBoolMapPointerStruct struct { - Field *map[bool]bool `validate:"required"` -} - -type ValidGenEqStringPointerStruct struct { - Field *string `valid:"eq=abcde"` -} - -type ValidatorEqStringPointerStruct struct { - Field *string `validate:"eq=abcde"` -} - -type ValidGenEqIntPointerStruct struct { - Field *int `valid:"eq=32"` -} - -type ValidatorEqIntPointerStruct struct { - Field *int `validate:"eq=32"` -} - -type ValidGenEqInt8PointerStruct struct { - Field *int8 `valid:"eq=32"` -} - -type ValidatorEqInt8PointerStruct struct { - Field *int8 `validate:"eq=32"` -} - -type ValidGenEqInt16PointerStruct struct { - Field *int16 `valid:"eq=32"` -} - -type ValidatorEqInt16PointerStruct struct { - Field *int16 `validate:"eq=32"` -} - -type ValidGenEqInt32PointerStruct struct { - Field *int32 `valid:"eq=32"` -} - -type ValidatorEqInt32PointerStruct struct { - Field *int32 `validate:"eq=32"` -} - -type ValidGenEqInt64PointerStruct struct { - Field *int64 `valid:"eq=32"` -} - -type ValidatorEqInt64PointerStruct struct { - Field *int64 `validate:"eq=32"` -} - -type ValidGenEqUintPointerStruct struct { - Field *uint `valid:"eq=32"` -} - -type ValidatorEqUintPointerStruct struct { - Field *uint `validate:"eq=32"` -} - -type ValidGenEqUint8PointerStruct struct { - Field *uint8 `valid:"eq=32"` -} - -type ValidatorEqUint8PointerStruct struct { - Field *uint8 `validate:"eq=32"` -} - -type ValidGenEqUint16PointerStruct struct { - Field *uint16 `valid:"eq=32"` -} - -type ValidatorEqUint16PointerStruct struct { - Field *uint16 `validate:"eq=32"` -} - -type ValidGenEqUint32PointerStruct struct { - Field *uint32 `valid:"eq=32"` -} - -type ValidatorEqUint32PointerStruct struct { - Field *uint32 `validate:"eq=32"` -} - -type ValidGenEqUint64PointerStruct struct { - Field *uint64 `valid:"eq=32"` -} - -type ValidatorEqUint64PointerStruct struct { - Field *uint64 `validate:"eq=32"` -} - -type ValidGenEqFloat32PointerStruct struct { - Field *float32 `valid:"eq=12.34"` -} - -type ValidatorEqFloat32PointerStruct struct { - Field *float32 `validate:"eq=12.34"` -} - -type ValidGenEqFloat64PointerStruct struct { - Field *float64 `valid:"eq=12.34"` -} - -type ValidatorEqFloat64PointerStruct struct { - Field *float64 `validate:"eq=12.34"` -} - -type ValidGenEqBoolPointerStruct struct { - Field *bool `valid:"eq=true"` -} - -type ValidatorEqBoolPointerStruct struct { - Field *bool `validate:"eq=true"` -} - -type ValidGenNeqStringPointerStruct struct { - Field *string `valid:"neq=abcde"` -} - -type ValidatorNeqStringPointerStruct struct { - Field *string `validate:"ne=abcde"` -} - -type ValidGenNeqIntPointerStruct struct { - Field *int `valid:"neq=32"` -} - -type ValidatorNeqIntPointerStruct struct { - Field *int `validate:"ne=32"` -} - -type ValidGenNeqInt8PointerStruct struct { - Field *int8 `valid:"neq=32"` -} - -type ValidatorNeqInt8PointerStruct struct { - Field *int8 `validate:"ne=32"` -} - -type ValidGenNeqInt16PointerStruct struct { - Field *int16 `valid:"neq=32"` -} - -type ValidatorNeqInt16PointerStruct struct { - Field *int16 `validate:"ne=32"` -} - -type ValidGenNeqInt32PointerStruct struct { - Field *int32 `valid:"neq=32"` -} - -type ValidatorNeqInt32PointerStruct struct { - Field *int32 `validate:"ne=32"` -} - -type ValidGenNeqInt64PointerStruct struct { - Field *int64 `valid:"neq=32"` -} - -type ValidatorNeqInt64PointerStruct struct { - Field *int64 `validate:"ne=32"` -} - -type ValidGenNeqUintPointerStruct struct { - Field *uint `valid:"neq=32"` -} - -type ValidatorNeqUintPointerStruct struct { - Field *uint `validate:"ne=32"` -} - -type ValidGenNeqUint8PointerStruct struct { - Field *uint8 `valid:"neq=32"` -} - -type ValidatorNeqUint8PointerStruct struct { - Field *uint8 `validate:"ne=32"` -} - -type ValidGenNeqUint16PointerStruct struct { - Field *uint16 `valid:"neq=32"` -} - -type ValidatorNeqUint16PointerStruct struct { - Field *uint16 `validate:"ne=32"` -} - -type ValidGenNeqUint32PointerStruct struct { - Field *uint32 `valid:"neq=32"` -} - -type ValidatorNeqUint32PointerStruct struct { - Field *uint32 `validate:"ne=32"` -} - -type ValidGenNeqUint64PointerStruct struct { - Field *uint64 `valid:"neq=32"` -} - -type ValidatorNeqUint64PointerStruct struct { - Field *uint64 `validate:"ne=32"` -} - -type ValidGenNeqFloat32PointerStruct struct { - Field *float32 `valid:"neq=12.34"` -} - -type ValidatorNeqFloat32PointerStruct struct { - Field *float32 `validate:"ne=12.34"` -} - -type ValidGenNeqFloat64PointerStruct struct { - Field *float64 `valid:"neq=12.34"` -} - -type ValidatorNeqFloat64PointerStruct struct { - Field *float64 `validate:"ne=12.34"` -} - -type ValidGenNeqBoolPointerStruct struct { - Field *bool `valid:"neq=true"` -} - -type ValidatorNeqBoolPointerStruct struct { - Field *bool `validate:"ne=true"` -} - -type ValidGenGtIntPointerStruct struct { - Field *int `valid:"gt=32"` -} - -type ValidatorGtIntPointerStruct struct { - Field *int `validate:"gt=32"` -} - -type ValidGenGtInt8PointerStruct struct { - Field *int8 `valid:"gt=32"` -} - -type ValidatorGtInt8PointerStruct struct { - Field *int8 `validate:"gt=32"` -} - -type ValidGenGtInt16PointerStruct struct { - Field *int16 `valid:"gt=32"` -} - -type ValidatorGtInt16PointerStruct struct { - Field *int16 `validate:"gt=32"` -} - -type ValidGenGtInt32PointerStruct struct { - Field *int32 `valid:"gt=32"` -} - -type ValidatorGtInt32PointerStruct struct { - Field *int32 `validate:"gt=32"` -} - -type ValidGenGtInt64PointerStruct struct { - Field *int64 `valid:"gt=32"` -} - -type ValidatorGtInt64PointerStruct struct { - Field *int64 `validate:"gt=32"` -} - -type ValidGenGtUintPointerStruct struct { - Field *uint `valid:"gt=32"` -} - -type ValidatorGtUintPointerStruct struct { - Field *uint `validate:"gt=32"` -} - -type ValidGenGtUint8PointerStruct struct { - Field *uint8 `valid:"gt=32"` -} - -type ValidatorGtUint8PointerStruct struct { - Field *uint8 `validate:"gt=32"` -} - -type ValidGenGtUint16PointerStruct struct { - Field *uint16 `valid:"gt=32"` -} - -type ValidatorGtUint16PointerStruct struct { - Field *uint16 `validate:"gt=32"` -} - -type ValidGenGtUint32PointerStruct struct { - Field *uint32 `valid:"gt=32"` -} - -type ValidatorGtUint32PointerStruct struct { - Field *uint32 `validate:"gt=32"` -} - -type ValidGenGtUint64PointerStruct struct { - Field *uint64 `valid:"gt=32"` -} - -type ValidatorGtUint64PointerStruct struct { - Field *uint64 `validate:"gt=32"` -} - -type ValidGenGtFloat32PointerStruct struct { - Field *float32 `valid:"gt=12.34"` -} - -type ValidatorGtFloat32PointerStruct struct { - Field *float32 `validate:"gt=12.34"` -} - -type ValidGenGtFloat64PointerStruct struct { - Field *float64 `valid:"gt=12.34"` -} - -type ValidatorGtFloat64PointerStruct struct { - Field *float64 `validate:"gt=12.34"` -} - -type ValidGenGteIntPointerStruct struct { - Field *int `valid:"gte=32"` -} - -type ValidatorGteIntPointerStruct struct { - Field *int `validate:"gte=32"` -} - -type ValidGenGteInt8PointerStruct struct { - Field *int8 `valid:"gte=32"` -} - -type ValidatorGteInt8PointerStruct struct { - Field *int8 `validate:"gte=32"` -} - -type ValidGenGteInt16PointerStruct struct { - Field *int16 `valid:"gte=32"` -} - -type ValidatorGteInt16PointerStruct struct { - Field *int16 `validate:"gte=32"` -} - -type ValidGenGteInt32PointerStruct struct { - Field *int32 `valid:"gte=32"` -} - -type ValidatorGteInt32PointerStruct struct { - Field *int32 `validate:"gte=32"` -} - -type ValidGenGteInt64PointerStruct struct { - Field *int64 `valid:"gte=32"` -} - -type ValidatorGteInt64PointerStruct struct { - Field *int64 `validate:"gte=32"` -} - -type ValidGenGteUintPointerStruct struct { - Field *uint `valid:"gte=32"` -} - -type ValidatorGteUintPointerStruct struct { - Field *uint `validate:"gte=32"` -} - -type ValidGenGteUint8PointerStruct struct { - Field *uint8 `valid:"gte=32"` -} - -type ValidatorGteUint8PointerStruct struct { - Field *uint8 `validate:"gte=32"` -} - -type ValidGenGteUint16PointerStruct struct { - Field *uint16 `valid:"gte=32"` -} - -type ValidatorGteUint16PointerStruct struct { - Field *uint16 `validate:"gte=32"` -} - -type ValidGenGteUint32PointerStruct struct { - Field *uint32 `valid:"gte=32"` -} - -type ValidatorGteUint32PointerStruct struct { - Field *uint32 `validate:"gte=32"` -} - -type ValidGenGteUint64PointerStruct struct { - Field *uint64 `valid:"gte=32"` -} - -type ValidatorGteUint64PointerStruct struct { - Field *uint64 `validate:"gte=32"` -} - -type ValidGenGteFloat32PointerStruct struct { - Field *float32 `valid:"gte=12.34"` -} - -type ValidatorGteFloat32PointerStruct struct { - Field *float32 `validate:"gte=12.34"` -} - -type ValidGenGteFloat64PointerStruct struct { - Field *float64 `valid:"gte=12.34"` -} - -type ValidatorGteFloat64PointerStruct struct { - Field *float64 `validate:"gte=12.34"` -} - -type ValidGenLtIntPointerStruct struct { - Field *int `valid:"lt=32"` -} - -type ValidatorLtIntPointerStruct struct { - Field *int `validate:"lt=32"` -} - -type ValidGenLtInt8PointerStruct struct { - Field *int8 `valid:"lt=32"` -} - -type ValidatorLtInt8PointerStruct struct { - Field *int8 `validate:"lt=32"` -} - -type ValidGenLtInt16PointerStruct struct { - Field *int16 `valid:"lt=32"` -} - -type ValidatorLtInt16PointerStruct struct { - Field *int16 `validate:"lt=32"` -} - -type ValidGenLtInt32PointerStruct struct { - Field *int32 `valid:"lt=32"` -} - -type ValidatorLtInt32PointerStruct struct { - Field *int32 `validate:"lt=32"` -} - -type ValidGenLtInt64PointerStruct struct { - Field *int64 `valid:"lt=32"` -} - -type ValidatorLtInt64PointerStruct struct { - Field *int64 `validate:"lt=32"` -} - -type ValidGenLtUintPointerStruct struct { - Field *uint `valid:"lt=32"` -} - -type ValidatorLtUintPointerStruct struct { - Field *uint `validate:"lt=32"` -} - -type ValidGenLtUint8PointerStruct struct { - Field *uint8 `valid:"lt=32"` -} - -type ValidatorLtUint8PointerStruct struct { - Field *uint8 `validate:"lt=32"` -} - -type ValidGenLtUint16PointerStruct struct { - Field *uint16 `valid:"lt=32"` -} - -type ValidatorLtUint16PointerStruct struct { - Field *uint16 `validate:"lt=32"` -} - -type ValidGenLtUint32PointerStruct struct { - Field *uint32 `valid:"lt=32"` -} - -type ValidatorLtUint32PointerStruct struct { - Field *uint32 `validate:"lt=32"` -} - -type ValidGenLtUint64PointerStruct struct { - Field *uint64 `valid:"lt=32"` -} - -type ValidatorLtUint64PointerStruct struct { - Field *uint64 `validate:"lt=32"` -} - -type ValidGenLtFloat32PointerStruct struct { - Field *float32 `valid:"lt=12.34"` -} - -type ValidatorLtFloat32PointerStruct struct { - Field *float32 `validate:"lt=12.34"` -} - -type ValidGenLtFloat64PointerStruct struct { - Field *float64 `valid:"lt=12.34"` -} - -type ValidatorLtFloat64PointerStruct struct { - Field *float64 `validate:"lt=12.34"` -} - -type ValidGenLteIntPointerStruct struct { - Field *int `valid:"lte=32"` -} - -type ValidatorLteIntPointerStruct struct { - Field *int `validate:"lte=32"` -} - -type ValidGenLteInt8PointerStruct struct { - Field *int8 `valid:"lte=32"` -} - -type ValidatorLteInt8PointerStruct struct { - Field *int8 `validate:"lte=32"` -} - -type ValidGenLteInt16PointerStruct struct { - Field *int16 `valid:"lte=32"` -} - -type ValidatorLteInt16PointerStruct struct { - Field *int16 `validate:"lte=32"` -} - -type ValidGenLteInt32PointerStruct struct { - Field *int32 `valid:"lte=32"` -} - -type ValidatorLteInt32PointerStruct struct { - Field *int32 `validate:"lte=32"` -} - -type ValidGenLteInt64PointerStruct struct { - Field *int64 `valid:"lte=32"` -} - -type ValidatorLteInt64PointerStruct struct { - Field *int64 `validate:"lte=32"` -} - -type ValidGenLteUintPointerStruct struct { - Field *uint `valid:"lte=32"` -} - -type ValidatorLteUintPointerStruct struct { - Field *uint `validate:"lte=32"` -} - -type ValidGenLteUint8PointerStruct struct { - Field *uint8 `valid:"lte=32"` -} - -type ValidatorLteUint8PointerStruct struct { - Field *uint8 `validate:"lte=32"` -} - -type ValidGenLteUint16PointerStruct struct { - Field *uint16 `valid:"lte=32"` -} - -type ValidatorLteUint16PointerStruct struct { - Field *uint16 `validate:"lte=32"` -} - -type ValidGenLteUint32PointerStruct struct { - Field *uint32 `valid:"lte=32"` -} - -type ValidatorLteUint32PointerStruct struct { - Field *uint32 `validate:"lte=32"` -} - -type ValidGenLteUint64PointerStruct struct { - Field *uint64 `valid:"lte=32"` -} - -type ValidatorLteUint64PointerStruct struct { - Field *uint64 `validate:"lte=32"` -} - -type ValidGenLteFloat32PointerStruct struct { - Field *float32 `valid:"lte=12.34"` -} - -type ValidatorLteFloat32PointerStruct struct { - Field *float32 `validate:"lte=12.34"` -} - -type ValidGenLteFloat64PointerStruct struct { - Field *float64 `valid:"lte=12.34"` -} - -type ValidatorLteFloat64PointerStruct struct { - Field *float64 `validate:"lte=12.34"` -} - -type ValidGenMinStringPointerStruct struct { - Field *string `valid:"min=5"` -} - -type ValidatorMinStringPointerStruct struct { - Field *string `validate:"min=5"` -} - -type ValidGenMinStringSlicePointerStruct struct { - Field *[]string `valid:"min=2"` -} - -type ValidatorMinStringSlicePointerStruct struct { - Field *[]string `validate:"min=2"` -} - -type ValidGenMinIntSlicePointerStruct struct { - Field *[]int `valid:"min=2"` -} - -type ValidatorMinIntSlicePointerStruct struct { - Field *[]int `validate:"min=2"` -} - -type ValidGenMinInt8SlicePointerStruct struct { - Field *[]int8 `valid:"min=2"` -} - -type ValidatorMinInt8SlicePointerStruct struct { - Field *[]int8 `validate:"min=2"` -} - -type ValidGenMinInt16SlicePointerStruct struct { - Field *[]int16 `valid:"min=2"` -} - -type ValidatorMinInt16SlicePointerStruct struct { - Field *[]int16 `validate:"min=2"` -} - -type ValidGenMinInt32SlicePointerStruct struct { - Field *[]int32 `valid:"min=2"` -} - -type ValidatorMinInt32SlicePointerStruct struct { - Field *[]int32 `validate:"min=2"` -} - -type ValidGenMinInt64SlicePointerStruct struct { - Field *[]int64 `valid:"min=2"` -} - -type ValidatorMinInt64SlicePointerStruct struct { - Field *[]int64 `validate:"min=2"` -} - -type ValidGenMinUintSlicePointerStruct struct { - Field *[]uint `valid:"min=2"` -} - -type ValidatorMinUintSlicePointerStruct struct { - Field *[]uint `validate:"min=2"` -} - -type ValidGenMinUint8SlicePointerStruct struct { - Field *[]uint8 `valid:"min=2"` -} - -type ValidatorMinUint8SlicePointerStruct struct { - Field *[]uint8 `validate:"min=2"` -} - -type ValidGenMinUint16SlicePointerStruct struct { - Field *[]uint16 `valid:"min=2"` -} - -type ValidatorMinUint16SlicePointerStruct struct { - Field *[]uint16 `validate:"min=2"` -} - -type ValidGenMinUint32SlicePointerStruct struct { - Field *[]uint32 `valid:"min=2"` -} - -type ValidatorMinUint32SlicePointerStruct struct { - Field *[]uint32 `validate:"min=2"` -} - -type ValidGenMinUint64SlicePointerStruct struct { - Field *[]uint64 `valid:"min=2"` -} - -type ValidatorMinUint64SlicePointerStruct struct { - Field *[]uint64 `validate:"min=2"` -} - -type ValidGenMinFloat32SlicePointerStruct struct { - Field *[]float32 `valid:"min=2"` -} - -type ValidatorMinFloat32SlicePointerStruct struct { - Field *[]float32 `validate:"min=2"` -} - -type ValidGenMinFloat64SlicePointerStruct struct { - Field *[]float64 `valid:"min=2"` -} - -type ValidatorMinFloat64SlicePointerStruct struct { - Field *[]float64 `validate:"min=2"` -} - -type ValidGenMinBoolSlicePointerStruct struct { - Field *[]bool `valid:"min=2"` -} - -type ValidatorMinBoolSlicePointerStruct struct { - Field *[]bool `validate:"min=2"` -} - -type ValidGenMinStringMapPointerStruct struct { - Field *map[string]string `valid:"min=2"` -} - -type ValidatorMinStringMapPointerStruct struct { - Field *map[string]string `validate:"min=2"` -} - -type ValidGenMinIntMapPointerStruct struct { - Field *map[int]int `valid:"min=2"` -} - -type ValidatorMinIntMapPointerStruct struct { - Field *map[int]int `validate:"min=2"` -} - -type ValidGenMinInt8MapPointerStruct struct { - Field *map[int8]int8 `valid:"min=2"` -} - -type ValidatorMinInt8MapPointerStruct struct { - Field *map[int8]int8 `validate:"min=2"` -} - -type ValidGenMinInt16MapPointerStruct struct { - Field *map[int16]int16 `valid:"min=2"` -} - -type ValidatorMinInt16MapPointerStruct struct { - Field *map[int16]int16 `validate:"min=2"` -} - -type ValidGenMinInt32MapPointerStruct struct { - Field *map[int32]int32 `valid:"min=2"` -} - -type ValidatorMinInt32MapPointerStruct struct { - Field *map[int32]int32 `validate:"min=2"` -} - -type ValidGenMinInt64MapPointerStruct struct { - Field *map[int64]int64 `valid:"min=2"` -} - -type ValidatorMinInt64MapPointerStruct struct { - Field *map[int64]int64 `validate:"min=2"` -} - -type ValidGenMinUintMapPointerStruct struct { - Field *map[uint]uint `valid:"min=2"` -} - -type ValidatorMinUintMapPointerStruct struct { - Field *map[uint]uint `validate:"min=2"` -} - -type ValidGenMinUint8MapPointerStruct struct { - Field *map[uint8]uint8 `valid:"min=2"` -} - -type ValidatorMinUint8MapPointerStruct struct { - Field *map[uint8]uint8 `validate:"min=2"` -} - -type ValidGenMinUint16MapPointerStruct struct { - Field *map[uint16]uint16 `valid:"min=2"` -} - -type ValidatorMinUint16MapPointerStruct struct { - Field *map[uint16]uint16 `validate:"min=2"` -} - -type ValidGenMinUint32MapPointerStruct struct { - Field *map[uint32]uint32 `valid:"min=2"` -} - -type ValidatorMinUint32MapPointerStruct struct { - Field *map[uint32]uint32 `validate:"min=2"` -} - -type ValidGenMinUint64MapPointerStruct struct { - Field *map[uint64]uint64 `valid:"min=2"` -} - -type ValidatorMinUint64MapPointerStruct struct { - Field *map[uint64]uint64 `validate:"min=2"` -} - -type ValidGenMinFloat32MapPointerStruct struct { - Field *map[float32]float32 `valid:"min=2"` -} - -type ValidatorMinFloat32MapPointerStruct struct { - Field *map[float32]float32 `validate:"min=2"` -} - -type ValidGenMinFloat64MapPointerStruct struct { - Field *map[float64]float64 `valid:"min=2"` -} - -type ValidatorMinFloat64MapPointerStruct struct { - Field *map[float64]float64 `validate:"min=2"` -} - -type ValidGenMinBoolMapPointerStruct struct { - Field *map[bool]bool `valid:"min=2"` -} - -type ValidatorMinBoolMapPointerStruct struct { - Field *map[bool]bool `validate:"min=2"` -} - -type ValidGenMaxStringPointerStruct struct { - Field *string `valid:"max=3"` -} - -type ValidatorMaxStringPointerStruct struct { - Field *string `validate:"max=3"` -} - -type ValidGenMaxStringSlicePointerStruct struct { - Field *[]string `valid:"max=2"` -} - -type ValidatorMaxStringSlicePointerStruct struct { - Field *[]string `validate:"max=2"` -} - -type ValidGenMaxIntSlicePointerStruct struct { - Field *[]int `valid:"max=2"` -} - -type ValidatorMaxIntSlicePointerStruct struct { - Field *[]int `validate:"max=2"` -} - -type ValidGenMaxInt8SlicePointerStruct struct { - Field *[]int8 `valid:"max=2"` -} - -type ValidatorMaxInt8SlicePointerStruct struct { - Field *[]int8 `validate:"max=2"` -} - -type ValidGenMaxInt16SlicePointerStruct struct { - Field *[]int16 `valid:"max=2"` -} - -type ValidatorMaxInt16SlicePointerStruct struct { - Field *[]int16 `validate:"max=2"` -} - -type ValidGenMaxInt32SlicePointerStruct struct { - Field *[]int32 `valid:"max=2"` -} - -type ValidatorMaxInt32SlicePointerStruct struct { - Field *[]int32 `validate:"max=2"` -} - -type ValidGenMaxInt64SlicePointerStruct struct { - Field *[]int64 `valid:"max=2"` -} - -type ValidatorMaxInt64SlicePointerStruct struct { - Field *[]int64 `validate:"max=2"` -} - -type ValidGenMaxUintSlicePointerStruct struct { - Field *[]uint `valid:"max=2"` -} - -type ValidatorMaxUintSlicePointerStruct struct { - Field *[]uint `validate:"max=2"` -} - -type ValidGenMaxUint8SlicePointerStruct struct { - Field *[]uint8 `valid:"max=2"` -} - -type ValidatorMaxUint8SlicePointerStruct struct { - Field *[]uint8 `validate:"max=2"` -} - -type ValidGenMaxUint16SlicePointerStruct struct { - Field *[]uint16 `valid:"max=2"` -} - -type ValidatorMaxUint16SlicePointerStruct struct { - Field *[]uint16 `validate:"max=2"` -} - -type ValidGenMaxUint32SlicePointerStruct struct { - Field *[]uint32 `valid:"max=2"` -} - -type ValidatorMaxUint32SlicePointerStruct struct { - Field *[]uint32 `validate:"max=2"` -} - -type ValidGenMaxUint64SlicePointerStruct struct { - Field *[]uint64 `valid:"max=2"` -} - -type ValidatorMaxUint64SlicePointerStruct struct { - Field *[]uint64 `validate:"max=2"` -} - -type ValidGenMaxFloat32SlicePointerStruct struct { - Field *[]float32 `valid:"max=2"` -} - -type ValidatorMaxFloat32SlicePointerStruct struct { - Field *[]float32 `validate:"max=2"` -} - -type ValidGenMaxFloat64SlicePointerStruct struct { - Field *[]float64 `valid:"max=2"` -} - -type ValidatorMaxFloat64SlicePointerStruct struct { - Field *[]float64 `validate:"max=2"` -} - -type ValidGenMaxBoolSlicePointerStruct struct { - Field *[]bool `valid:"max=2"` -} - -type ValidatorMaxBoolSlicePointerStruct struct { - Field *[]bool `validate:"max=2"` -} - -type ValidGenMaxStringMapPointerStruct struct { - Field *map[string]string `valid:"max=2"` -} - -type ValidatorMaxStringMapPointerStruct struct { - Field *map[string]string `validate:"max=2"` -} - -type ValidGenMaxIntMapPointerStruct struct { - Field *map[int]int `valid:"max=2"` -} - -type ValidatorMaxIntMapPointerStruct struct { - Field *map[int]int `validate:"max=2"` -} - -type ValidGenMaxInt8MapPointerStruct struct { - Field *map[int8]int8 `valid:"max=2"` -} - -type ValidatorMaxInt8MapPointerStruct struct { - Field *map[int8]int8 `validate:"max=2"` -} - -type ValidGenMaxInt16MapPointerStruct struct { - Field *map[int16]int16 `valid:"max=2"` -} - -type ValidatorMaxInt16MapPointerStruct struct { - Field *map[int16]int16 `validate:"max=2"` -} - -type ValidGenMaxInt32MapPointerStruct struct { - Field *map[int32]int32 `valid:"max=2"` -} - -type ValidatorMaxInt32MapPointerStruct struct { - Field *map[int32]int32 `validate:"max=2"` -} - -type ValidGenMaxInt64MapPointerStruct struct { - Field *map[int64]int64 `valid:"max=2"` -} - -type ValidatorMaxInt64MapPointerStruct struct { - Field *map[int64]int64 `validate:"max=2"` -} - -type ValidGenMaxUintMapPointerStruct struct { - Field *map[uint]uint `valid:"max=2"` -} - -type ValidatorMaxUintMapPointerStruct struct { - Field *map[uint]uint `validate:"max=2"` -} - -type ValidGenMaxUint8MapPointerStruct struct { - Field *map[uint8]uint8 `valid:"max=2"` -} - -type ValidatorMaxUint8MapPointerStruct struct { - Field *map[uint8]uint8 `validate:"max=2"` -} - -type ValidGenMaxUint16MapPointerStruct struct { - Field *map[uint16]uint16 `valid:"max=2"` -} - -type ValidatorMaxUint16MapPointerStruct struct { - Field *map[uint16]uint16 `validate:"max=2"` -} - -type ValidGenMaxUint32MapPointerStruct struct { - Field *map[uint32]uint32 `valid:"max=2"` -} - -type ValidatorMaxUint32MapPointerStruct struct { - Field *map[uint32]uint32 `validate:"max=2"` -} - -type ValidGenMaxUint64MapPointerStruct struct { - Field *map[uint64]uint64 `valid:"max=2"` -} - -type ValidatorMaxUint64MapPointerStruct struct { - Field *map[uint64]uint64 `validate:"max=2"` -} - -type ValidGenMaxFloat32MapPointerStruct struct { - Field *map[float32]float32 `valid:"max=2"` -} - -type ValidatorMaxFloat32MapPointerStruct struct { - Field *map[float32]float32 `validate:"max=2"` -} - -type ValidGenMaxFloat64MapPointerStruct struct { - Field *map[float64]float64 `valid:"max=2"` -} - -type ValidatorMaxFloat64MapPointerStruct struct { - Field *map[float64]float64 `validate:"max=2"` -} - -type ValidGenMaxBoolMapPointerStruct struct { - Field *map[bool]bool `valid:"max=1"` -} - -type ValidatorMaxBoolMapPointerStruct struct { - Field *map[bool]bool `validate:"max=1"` -} - -type ValidGenEq_ignore_caseStringPointerStruct struct { - Field *string `valid:"eq_ignore_case=abcde"` -} - -type ValidatorEq_ignore_caseStringPointerStruct struct { - Field *string `validate:"eq_ignore_case=abcde"` -} - -type ValidGenNeq_ignore_caseStringPointerStruct struct { - Field *string `valid:"neq_ignore_case=abcde"` -} - -type ValidatorNeq_ignore_caseStringPointerStruct struct { - Field *string `validate:"ne_ignore_case=abcde"` -} - -type ValidGenLenStringPointerStruct struct { - Field *string `valid:"len=2"` -} - -type ValidatorLenStringPointerStruct struct { - Field *string `validate:"len=2"` -} - -type ValidGenLenStringSlicePointerStruct struct { - Field *[]string `valid:"len=2"` -} - -type ValidatorLenStringSlicePointerStruct struct { - Field *[]string `validate:"len=2"` -} - -type ValidGenLenIntSlicePointerStruct struct { - Field *[]int `valid:"len=2"` -} - -type ValidatorLenIntSlicePointerStruct struct { - Field *[]int `validate:"len=2"` -} - -type ValidGenLenInt8SlicePointerStruct struct { - Field *[]int8 `valid:"len=2"` -} - -type ValidatorLenInt8SlicePointerStruct struct { - Field *[]int8 `validate:"len=2"` -} - -type ValidGenLenInt16SlicePointerStruct struct { - Field *[]int16 `valid:"len=2"` -} - -type ValidatorLenInt16SlicePointerStruct struct { - Field *[]int16 `validate:"len=2"` -} - -type ValidGenLenInt32SlicePointerStruct struct { - Field *[]int32 `valid:"len=2"` -} - -type ValidatorLenInt32SlicePointerStruct struct { - Field *[]int32 `validate:"len=2"` -} - -type ValidGenLenInt64SlicePointerStruct struct { - Field *[]int64 `valid:"len=2"` -} - -type ValidatorLenInt64SlicePointerStruct struct { - Field *[]int64 `validate:"len=2"` -} - -type ValidGenLenUintSlicePointerStruct struct { - Field *[]uint `valid:"len=2"` -} - -type ValidatorLenUintSlicePointerStruct struct { - Field *[]uint `validate:"len=2"` -} - -type ValidGenLenUint8SlicePointerStruct struct { - Field *[]uint8 `valid:"len=2"` -} - -type ValidatorLenUint8SlicePointerStruct struct { - Field *[]uint8 `validate:"len=2"` -} - -type ValidGenLenUint16SlicePointerStruct struct { - Field *[]uint16 `valid:"len=2"` -} - -type ValidatorLenUint16SlicePointerStruct struct { - Field *[]uint16 `validate:"len=2"` -} - -type ValidGenLenUint32SlicePointerStruct struct { - Field *[]uint32 `valid:"len=2"` -} - -type ValidatorLenUint32SlicePointerStruct struct { - Field *[]uint32 `validate:"len=2"` -} - -type ValidGenLenUint64SlicePointerStruct struct { - Field *[]uint64 `valid:"len=2"` -} - -type ValidatorLenUint64SlicePointerStruct struct { - Field *[]uint64 `validate:"len=2"` -} - -type ValidGenLenFloat32SlicePointerStruct struct { - Field *[]float32 `valid:"len=2"` -} - -type ValidatorLenFloat32SlicePointerStruct struct { - Field *[]float32 `validate:"len=2"` -} - -type ValidGenLenFloat64SlicePointerStruct struct { - Field *[]float64 `valid:"len=2"` -} - -type ValidatorLenFloat64SlicePointerStruct struct { - Field *[]float64 `validate:"len=2"` -} - -type ValidGenLenBoolSlicePointerStruct struct { - Field *[]bool `valid:"len=2"` -} - -type ValidatorLenBoolSlicePointerStruct struct { - Field *[]bool `validate:"len=2"` -} - -type ValidGenLenStringMapPointerStruct struct { - Field *map[string]string `valid:"len=2"` -} - -type ValidatorLenStringMapPointerStruct struct { - Field *map[string]string `validate:"len=2"` -} - -type ValidGenLenIntMapPointerStruct struct { - Field *map[int]int `valid:"len=2"` -} - -type ValidatorLenIntMapPointerStruct struct { - Field *map[int]int `validate:"len=2"` -} - -type ValidGenLenInt8MapPointerStruct struct { - Field *map[int8]int8 `valid:"len=2"` -} - -type ValidatorLenInt8MapPointerStruct struct { - Field *map[int8]int8 `validate:"len=2"` -} - -type ValidGenLenInt16MapPointerStruct struct { - Field *map[int16]int16 `valid:"len=2"` -} - -type ValidatorLenInt16MapPointerStruct struct { - Field *map[int16]int16 `validate:"len=2"` -} - -type ValidGenLenInt32MapPointerStruct struct { - Field *map[int32]int32 `valid:"len=2"` -} - -type ValidatorLenInt32MapPointerStruct struct { - Field *map[int32]int32 `validate:"len=2"` -} - -type ValidGenLenInt64MapPointerStruct struct { - Field *map[int64]int64 `valid:"len=2"` -} - -type ValidatorLenInt64MapPointerStruct struct { - Field *map[int64]int64 `validate:"len=2"` -} - -type ValidGenLenUintMapPointerStruct struct { - Field *map[uint]uint `valid:"len=2"` -} - -type ValidatorLenUintMapPointerStruct struct { - Field *map[uint]uint `validate:"len=2"` -} - -type ValidGenLenUint8MapPointerStruct struct { - Field *map[uint8]uint8 `valid:"len=2"` -} - -type ValidatorLenUint8MapPointerStruct struct { - Field *map[uint8]uint8 `validate:"len=2"` -} - -type ValidGenLenUint16MapPointerStruct struct { - Field *map[uint16]uint16 `valid:"len=2"` -} - -type ValidatorLenUint16MapPointerStruct struct { - Field *map[uint16]uint16 `validate:"len=2"` -} - -type ValidGenLenUint32MapPointerStruct struct { - Field *map[uint32]uint32 `valid:"len=2"` -} - -type ValidatorLenUint32MapPointerStruct struct { - Field *map[uint32]uint32 `validate:"len=2"` -} - -type ValidGenLenUint64MapPointerStruct struct { - Field *map[uint64]uint64 `valid:"len=2"` -} - -type ValidatorLenUint64MapPointerStruct struct { - Field *map[uint64]uint64 `validate:"len=2"` -} - -type ValidGenLenFloat32MapPointerStruct struct { - Field *map[float32]float32 `valid:"len=2"` -} - -type ValidatorLenFloat32MapPointerStruct struct { - Field *map[float32]float32 `validate:"len=2"` -} - -type ValidGenLenFloat64MapPointerStruct struct { - Field *map[float64]float64 `valid:"len=2"` -} - -type ValidatorLenFloat64MapPointerStruct struct { - Field *map[float64]float64 `validate:"len=2"` -} - -type ValidGenLenBoolMapPointerStruct struct { - Field *map[bool]bool `valid:"len=2"` -} - -type ValidatorLenBoolMapPointerStruct struct { - Field *map[bool]bool `validate:"len=2"` -} - -type ValidGenInStringPointerStruct struct { - Field *string `valid:"in=ab cd ef"` -} - -type ValidatorInStringPointerStruct struct { - Field *string `validate:"oneof=ab cd ef"` -} - -type ValidGenInIntPointerStruct struct { - Field *int `valid:"in=12 34 56"` -} - -type ValidatorInIntPointerStruct struct { - Field *int `validate:"oneof=12 34 56"` -} - -type ValidGenInInt8PointerStruct struct { - Field *int8 `valid:"in=12 34 56"` -} - -type ValidatorInInt8PointerStruct struct { - Field *int8 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt16PointerStruct struct { - Field *int16 `valid:"in=12 34 56"` -} - -type ValidatorInInt16PointerStruct struct { - Field *int16 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt32PointerStruct struct { - Field *int32 `valid:"in=12 34 56"` -} - -type ValidatorInInt32PointerStruct struct { - Field *int32 `validate:"oneof=12 34 56"` -} - -type ValidGenInInt64PointerStruct struct { - Field *int64 `valid:"in=12 34 56"` -} - -type ValidatorInInt64PointerStruct struct { - Field *int64 `validate:"oneof=12 34 56"` -} - -type ValidGenInUintPointerStruct struct { - Field *uint `valid:"in=12 34 56"` -} - -type ValidatorInUintPointerStruct struct { - Field *uint `validate:"oneof=12 34 56"` -} - -type ValidGenInUint8PointerStruct struct { - Field *uint8 `valid:"in=12 34 56"` -} - -type ValidatorInUint8PointerStruct struct { - Field *uint8 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint16PointerStruct struct { - Field *uint16 `valid:"in=12 34 56"` -} - -type ValidatorInUint16PointerStruct struct { - Field *uint16 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint32PointerStruct struct { - Field *uint32 `valid:"in=12 34 56"` -} - -type ValidatorInUint32PointerStruct struct { - Field *uint32 `validate:"oneof=12 34 56"` -} - -type ValidGenInUint64PointerStruct struct { - Field *uint64 `valid:"in=12 34 56"` -} - -type ValidatorInUint64PointerStruct struct { - Field *uint64 `validate:"oneof=12 34 56"` -} - -func BenchmarkValidGenEmailStringPointer(b *testing.B) { - var validInput string = "abcde@example.com" - data := &ValidGenEmailStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEmailStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEmailStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "abcde@example.com" - - data := &ValidatorEmailStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringPointer(b *testing.B) { - var validInput string = "abcde" - data := &ValidGenRequiredStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "abcde" - - data := &ValidatorRequiredStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntPointer(b *testing.B) { - var validInput int = 32 - data := &ValidGenRequiredIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 32 - - data := &ValidatorRequiredIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8Pointer(b *testing.B) { - var validInput int8 = 32 - data := &ValidGenRequiredInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 32 - - data := &ValidatorRequiredInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16Pointer(b *testing.B) { - var validInput int16 = 32 - data := &ValidGenRequiredInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 32 - - data := &ValidatorRequiredInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32Pointer(b *testing.B) { - var validInput int32 = 32 - data := &ValidGenRequiredInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 32 - - data := &ValidatorRequiredInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64Pointer(b *testing.B) { - var validInput int64 = 32 - data := &ValidGenRequiredInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 32 - - data := &ValidatorRequiredInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintPointer(b *testing.B) { - var validInput uint = 32 - data := &ValidGenRequiredUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 32 - - data := &ValidatorRequiredUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8Pointer(b *testing.B) { - var validInput uint8 = 32 - data := &ValidGenRequiredUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 32 - - data := &ValidatorRequiredUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16Pointer(b *testing.B) { - var validInput uint16 = 32 - data := &ValidGenRequiredUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 32 - - data := &ValidatorRequiredUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32Pointer(b *testing.B) { - var validInput uint32 = 32 - data := &ValidGenRequiredUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 32 - - data := &ValidatorRequiredUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64Pointer(b *testing.B) { - var validInput uint64 = 32 - data := &ValidGenRequiredUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 32 - - data := &ValidatorRequiredUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32Pointer(b *testing.B) { - var validInput float32 = 12.34 - data := &ValidGenRequiredFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.34 - - data := &ValidatorRequiredFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64Pointer(b *testing.B) { - var validInput float64 = 12.34 - data := &ValidGenRequiredFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.34 - - data := &ValidatorRequiredFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolPointer(b *testing.B) { - var validInput bool = true - data := &ValidGenRequiredBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredBoolPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput bool = true - - data := &ValidatorRequiredBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringSlicePointer(b *testing.B) { - var validInput []string = []string{"abcde"} - data := &ValidGenRequiredStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredStringSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []string = []string{"abcde"} - - data := &ValidatorRequiredStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntSlicePointer(b *testing.B) { - var validInput []int = []int{32} - data := &ValidGenRequiredIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredIntSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int = []int{32} - - data := &ValidatorRequiredIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8SlicePointer(b *testing.B) { - var validInput []int8 = []int8{32} - data := &ValidGenRequiredInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int8 = []int8{32} - - data := &ValidatorRequiredInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16SlicePointer(b *testing.B) { - var validInput []int16 = []int16{32} - data := &ValidGenRequiredInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int16 = []int16{32} - - data := &ValidatorRequiredInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32SlicePointer(b *testing.B) { - var validInput []int32 = []int32{32} - data := &ValidGenRequiredInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int32 = []int32{32} - - data := &ValidatorRequiredInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64SlicePointer(b *testing.B) { - var validInput []int64 = []int64{32} - data := &ValidGenRequiredInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int64 = []int64{32} - - data := &ValidatorRequiredInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintSlicePointer(b *testing.B) { - var validInput []uint = []uint{32} - data := &ValidGenRequiredUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUintSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint = []uint{32} - - data := &ValidatorRequiredUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8SlicePointer(b *testing.B) { - var validInput []uint8 = []uint8{32} - data := &ValidGenRequiredUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint8 = []uint8{32} - - data := &ValidatorRequiredUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16SlicePointer(b *testing.B) { - var validInput []uint16 = []uint16{32} - data := &ValidGenRequiredUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint16 = []uint16{32} - - data := &ValidatorRequiredUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32SlicePointer(b *testing.B) { - var validInput []uint32 = []uint32{32} - data := &ValidGenRequiredUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint32 = []uint32{32} - - data := &ValidatorRequiredUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64SlicePointer(b *testing.B) { - var validInput []uint64 = []uint64{32} - data := &ValidGenRequiredUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint64 = []uint64{32} - - data := &ValidatorRequiredUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32SlicePointer(b *testing.B) { - var validInput []float32 = []float32{12.34} - data := &ValidGenRequiredFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float32 = []float32{12.34} - - data := &ValidatorRequiredFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64SlicePointer(b *testing.B) { - var validInput []float64 = []float64{12.34} - data := &ValidGenRequiredFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float64 = []float64{12.34} - - data := &ValidatorRequiredFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolSlicePointer(b *testing.B) { - var validInput []bool = []bool{true} - data := &ValidGenRequiredBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredBoolSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []bool = []bool{true} - - data := &ValidatorRequiredBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringArrayPointer(b *testing.B) { - var validInput [3]string = [3]string{"abcde"} - data := &ValidGenRequiredStringArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredStringArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]string = [3]string{"abcde"} - - data := &ValidatorRequiredStringArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntArrayPointer(b *testing.B) { - var validInput [3]int = [3]int{32} - data := &ValidGenRequiredIntArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredIntArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]int = [3]int{32} - - data := &ValidatorRequiredIntArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8ArrayPointer(b *testing.B) { - var validInput [3]int8 = [3]int8{32} - data := &ValidGenRequiredInt8ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt8ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]int8 = [3]int8{32} - - data := &ValidatorRequiredInt8ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16ArrayPointer(b *testing.B) { - var validInput [3]int16 = [3]int16{32} - data := &ValidGenRequiredInt16ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt16ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]int16 = [3]int16{32} - - data := &ValidatorRequiredInt16ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32ArrayPointer(b *testing.B) { - var validInput [3]int32 = [3]int32{32} - data := &ValidGenRequiredInt32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt32ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]int32 = [3]int32{32} - - data := &ValidatorRequiredInt32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64ArrayPointer(b *testing.B) { - var validInput [3]int64 = [3]int64{32} - data := &ValidGenRequiredInt64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt64ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]int64 = [3]int64{32} - - data := &ValidatorRequiredInt64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintArrayPointer(b *testing.B) { - var validInput [3]uint = [3]uint{32} - data := &ValidGenRequiredUintArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUintArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]uint = [3]uint{32} - - data := &ValidatorRequiredUintArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8ArrayPointer(b *testing.B) { - var validInput [3]uint8 = [3]uint8{32} - data := &ValidGenRequiredUint8ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint8ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]uint8 = [3]uint8{32} - - data := &ValidatorRequiredUint8ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16ArrayPointer(b *testing.B) { - var validInput [3]uint16 = [3]uint16{32} - data := &ValidGenRequiredUint16ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint16ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]uint16 = [3]uint16{32} - - data := &ValidatorRequiredUint16ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32ArrayPointer(b *testing.B) { - var validInput [3]uint32 = [3]uint32{32} - data := &ValidGenRequiredUint32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint32ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]uint32 = [3]uint32{32} - - data := &ValidatorRequiredUint32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64ArrayPointer(b *testing.B) { - var validInput [3]uint64 = [3]uint64{32} - data := &ValidGenRequiredUint64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint64ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]uint64 = [3]uint64{32} - - data := &ValidatorRequiredUint64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32ArrayPointer(b *testing.B) { - var validInput [3]float32 = [3]float32{12.34} - data := &ValidGenRequiredFloat32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]float32 = [3]float32{12.34} - - data := &ValidatorRequiredFloat32ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64ArrayPointer(b *testing.B) { - var validInput [3]float64 = [3]float64{12.34} - data := &ValidGenRequiredFloat64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64ArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64ArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]float64 = [3]float64{12.34} - - data := &ValidatorRequiredFloat64ArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolArrayPointer(b *testing.B) { - var validInput [3]bool = [3]bool{true} - data := &ValidGenRequiredBoolArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredBoolArrayPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolArrayPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput [3]bool = [3]bool{true} - - data := &ValidatorRequiredBoolArrayPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredStringMapPointer(b *testing.B) { - var validInput map[string]string = map[string]string{"abcde": "value"} - data := &ValidGenRequiredStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredStringMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredStringMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[string]string = map[string]string{"abcde": "value"} - - data := &ValidatorRequiredStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredIntMapPointer(b *testing.B) { - var validInput map[int]int = map[int]int{32: 64} - data := &ValidGenRequiredIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredIntMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredIntMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int]int = map[int]int{32: 64} - - data := &ValidatorRequiredIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt8MapPointer(b *testing.B) { - var validInput map[int8]int8 = map[int8]int8{32: 64} - data := &ValidGenRequiredInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int8]int8 = map[int8]int8{32: 64} - - data := &ValidatorRequiredInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt16MapPointer(b *testing.B) { - var validInput map[int16]int16 = map[int16]int16{32: 64} - data := &ValidGenRequiredInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int16]int16 = map[int16]int16{32: 64} - - data := &ValidatorRequiredInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt32MapPointer(b *testing.B) { - var validInput map[int32]int32 = map[int32]int32{32: 64} - data := &ValidGenRequiredInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int32]int32 = map[int32]int32{32: 64} - - data := &ValidatorRequiredInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredInt64MapPointer(b *testing.B) { - var validInput map[int64]int64 = map[int64]int64{32: 64} - data := &ValidGenRequiredInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredInt64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredInt64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int64]int64 = map[int64]int64{32: 64} - - data := &ValidatorRequiredInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUintMapPointer(b *testing.B) { - var validInput map[uint]uint = map[uint]uint{32: 64} - data := &ValidGenRequiredUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUintMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUintMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint]uint = map[uint]uint{32: 64} - - data := &ValidatorRequiredUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint8MapPointer(b *testing.B) { - var validInput map[uint8]uint8 = map[uint8]uint8{32: 64} - data := &ValidGenRequiredUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint8]uint8 = map[uint8]uint8{32: 64} - - data := &ValidatorRequiredUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint16MapPointer(b *testing.B) { - var validInput map[uint16]uint16 = map[uint16]uint16{32: 64} - data := &ValidGenRequiredUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint16]uint16 = map[uint16]uint16{32: 64} - - data := &ValidatorRequiredUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint32MapPointer(b *testing.B) { - var validInput map[uint32]uint32 = map[uint32]uint32{32: 64} - data := &ValidGenRequiredUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint32]uint32 = map[uint32]uint32{32: 64} - - data := &ValidatorRequiredUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredUint64MapPointer(b *testing.B) { - var validInput map[uint64]uint64 = map[uint64]uint64{32: 64} - data := &ValidGenRequiredUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredUint64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredUint64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint64]uint64 = map[uint64]uint64{32: 64} - - data := &ValidatorRequiredUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat32MapPointer(b *testing.B) { - var validInput map[float32]float32 = map[float32]float32{12.34: 56.78} - data := &ValidGenRequiredFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float32]float32 = map[float32]float32{12.34: 56.78} - - data := &ValidatorRequiredFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredFloat64MapPointer(b *testing.B) { - var validInput map[float64]float64 = map[float64]float64{12.34: 56.78} - data := &ValidGenRequiredFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredFloat64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredFloat64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float64]float64 = map[float64]float64{12.34: 56.78} - - data := &ValidatorRequiredFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenRequiredBoolMapPointer(b *testing.B) { - var validInput map[bool]bool = map[bool]bool{true: true} - data := &ValidGenRequiredBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenRequiredBoolMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorRequiredBoolMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[bool]bool = map[bool]bool{true: true} - - data := &ValidatorRequiredBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqStringPointer(b *testing.B) { - var validInput string = "abcde" - data := &ValidGenEqStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "abcde" - - data := &ValidatorEqStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqIntPointer(b *testing.B) { - var validInput int = 32 - data := &ValidGenEqIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 32 - - data := &ValidatorEqIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt8Pointer(b *testing.B) { - var validInput int8 = 32 - data := &ValidGenEqInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 32 - - data := &ValidatorEqInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt16Pointer(b *testing.B) { - var validInput int16 = 32 - data := &ValidGenEqInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 32 - - data := &ValidatorEqInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt32Pointer(b *testing.B) { - var validInput int32 = 32 - data := &ValidGenEqInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 32 - - data := &ValidatorEqInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqInt64Pointer(b *testing.B) { - var validInput int64 = 32 - data := &ValidGenEqInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 32 - - data := &ValidatorEqInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUintPointer(b *testing.B) { - var validInput uint = 32 - data := &ValidGenEqUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 32 - - data := &ValidatorEqUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint8Pointer(b *testing.B) { - var validInput uint8 = 32 - data := &ValidGenEqUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 32 - - data := &ValidatorEqUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint16Pointer(b *testing.B) { - var validInput uint16 = 32 - data := &ValidGenEqUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 32 - - data := &ValidatorEqUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint32Pointer(b *testing.B) { - var validInput uint32 = 32 - data := &ValidGenEqUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 32 - - data := &ValidatorEqUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqUint64Pointer(b *testing.B) { - var validInput uint64 = 32 - data := &ValidGenEqUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 32 - - data := &ValidatorEqUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqFloat32Pointer(b *testing.B) { - var validInput float32 = 12.34 - data := &ValidGenEqFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.34 - - data := &ValidatorEqFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqFloat64Pointer(b *testing.B) { - var validInput float64 = 12.34 - data := &ValidGenEqFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.34 - - data := &ValidatorEqFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEqBoolPointer(b *testing.B) { - var validInput bool = true - data := &ValidGenEqBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEqBoolPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEqBoolPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput bool = true - - data := &ValidatorEqBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqStringPointer(b *testing.B) { - var validInput string = "fghij" - data := &ValidGenNeqStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "fghij" - - data := &ValidatorNeqStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqIntPointer(b *testing.B) { - var validInput int = 64 - data := &ValidGenNeqIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 64 - - data := &ValidatorNeqIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt8Pointer(b *testing.B) { - var validInput int8 = 64 - data := &ValidGenNeqInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 64 - - data := &ValidatorNeqInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt16Pointer(b *testing.B) { - var validInput int16 = 64 - data := &ValidGenNeqInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 64 - - data := &ValidatorNeqInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt32Pointer(b *testing.B) { - var validInput int32 = 64 - data := &ValidGenNeqInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 64 - - data := &ValidatorNeqInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqInt64Pointer(b *testing.B) { - var validInput int64 = 64 - data := &ValidGenNeqInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 64 - - data := &ValidatorNeqInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUintPointer(b *testing.B) { - var validInput uint = 64 - data := &ValidGenNeqUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 64 - - data := &ValidatorNeqUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint8Pointer(b *testing.B) { - var validInput uint8 = 64 - data := &ValidGenNeqUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 64 - - data := &ValidatorNeqUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint16Pointer(b *testing.B) { - var validInput uint16 = 64 - data := &ValidGenNeqUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 64 - - data := &ValidatorNeqUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint32Pointer(b *testing.B) { - var validInput uint32 = 64 - data := &ValidGenNeqUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 64 - - data := &ValidatorNeqUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqUint64Pointer(b *testing.B) { - var validInput uint64 = 64 - data := &ValidGenNeqUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 64 - - data := &ValidatorNeqUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqFloat32Pointer(b *testing.B) { - var validInput float32 = 34.56 - data := &ValidGenNeqFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 34.56 - - data := &ValidatorNeqFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqFloat64Pointer(b *testing.B) { - var validInput float64 = 34.56 - data := &ValidGenNeqFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 34.56 - - data := &ValidatorNeqFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeqBoolPointer(b *testing.B) { - var validInput bool = false - data := &ValidGenNeqBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeqBoolPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeqBoolPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput bool = false - - data := &ValidatorNeqBoolPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtIntPointer(b *testing.B) { - var validInput int = 33 - data := &ValidGenGtIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 33 - - data := &ValidatorGtIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt8Pointer(b *testing.B) { - var validInput int8 = 33 - data := &ValidGenGtInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 33 - - data := &ValidatorGtInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt16Pointer(b *testing.B) { - var validInput int16 = 33 - data := &ValidGenGtInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 33 - - data := &ValidatorGtInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt32Pointer(b *testing.B) { - var validInput int32 = 33 - data := &ValidGenGtInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 33 - - data := &ValidatorGtInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtInt64Pointer(b *testing.B) { - var validInput int64 = 33 - data := &ValidGenGtInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 33 - - data := &ValidatorGtInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUintPointer(b *testing.B) { - var validInput uint = 33 - data := &ValidGenGtUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 33 - - data := &ValidatorGtUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint8Pointer(b *testing.B) { - var validInput uint8 = 33 - data := &ValidGenGtUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 33 - - data := &ValidatorGtUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint16Pointer(b *testing.B) { - var validInput uint16 = 33 - data := &ValidGenGtUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 33 - - data := &ValidatorGtUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint32Pointer(b *testing.B) { - var validInput uint32 = 33 - data := &ValidGenGtUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 33 - - data := &ValidatorGtUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtUint64Pointer(b *testing.B) { - var validInput uint64 = 33 - data := &ValidGenGtUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 33 - - data := &ValidatorGtUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtFloat32Pointer(b *testing.B) { - var validInput float32 = 12.35 - data := &ValidGenGtFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.35 - - data := &ValidatorGtFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGtFloat64Pointer(b *testing.B) { - var validInput float64 = 12.35 - data := &ValidGenGtFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGtFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGtFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.35 - - data := &ValidatorGtFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteIntPointer(b *testing.B) { - var validInput int = 32 - data := &ValidGenGteIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 32 - - data := &ValidatorGteIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt8Pointer(b *testing.B) { - var validInput int8 = 32 - data := &ValidGenGteInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 32 - - data := &ValidatorGteInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt16Pointer(b *testing.B) { - var validInput int16 = 32 - data := &ValidGenGteInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 32 - - data := &ValidatorGteInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt32Pointer(b *testing.B) { - var validInput int32 = 32 - data := &ValidGenGteInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 32 - - data := &ValidatorGteInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteInt64Pointer(b *testing.B) { - var validInput int64 = 32 - data := &ValidGenGteInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 32 - - data := &ValidatorGteInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUintPointer(b *testing.B) { - var validInput uint = 32 - data := &ValidGenGteUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 32 - - data := &ValidatorGteUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint8Pointer(b *testing.B) { - var validInput uint8 = 32 - data := &ValidGenGteUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 32 - - data := &ValidatorGteUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint16Pointer(b *testing.B) { - var validInput uint16 = 32 - data := &ValidGenGteUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 32 - - data := &ValidatorGteUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint32Pointer(b *testing.B) { - var validInput uint32 = 32 - data := &ValidGenGteUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 32 - - data := &ValidatorGteUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteUint64Pointer(b *testing.B) { - var validInput uint64 = 32 - data := &ValidGenGteUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 32 - - data := &ValidatorGteUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteFloat32Pointer(b *testing.B) { - var validInput float32 = 12.34 - data := &ValidGenGteFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.34 - - data := &ValidatorGteFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenGteFloat64Pointer(b *testing.B) { - var validInput float64 = 12.34 - data := &ValidGenGteFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenGteFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorGteFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.34 - - data := &ValidatorGteFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtIntPointer(b *testing.B) { - var validInput int = 31 - data := &ValidGenLtIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 31 - - data := &ValidatorLtIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt8Pointer(b *testing.B) { - var validInput int8 = 31 - data := &ValidGenLtInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 31 - - data := &ValidatorLtInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt16Pointer(b *testing.B) { - var validInput int16 = 31 - data := &ValidGenLtInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 31 - - data := &ValidatorLtInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt32Pointer(b *testing.B) { - var validInput int32 = 31 - data := &ValidGenLtInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 31 - - data := &ValidatorLtInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtInt64Pointer(b *testing.B) { - var validInput int64 = 31 - data := &ValidGenLtInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 31 - - data := &ValidatorLtInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUintPointer(b *testing.B) { - var validInput uint = 31 - data := &ValidGenLtUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 31 - - data := &ValidatorLtUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint8Pointer(b *testing.B) { - var validInput uint8 = 31 - data := &ValidGenLtUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 31 - - data := &ValidatorLtUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint16Pointer(b *testing.B) { - var validInput uint16 = 31 - data := &ValidGenLtUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 31 - - data := &ValidatorLtUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint32Pointer(b *testing.B) { - var validInput uint32 = 31 - data := &ValidGenLtUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 31 - - data := &ValidatorLtUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtUint64Pointer(b *testing.B) { - var validInput uint64 = 31 - data := &ValidGenLtUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 31 - - data := &ValidatorLtUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtFloat32Pointer(b *testing.B) { - var validInput float32 = 12.33 - data := &ValidGenLtFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.33 - - data := &ValidatorLtFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLtFloat64Pointer(b *testing.B) { - var validInput float64 = 12.33 - data := &ValidGenLtFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLtFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLtFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.33 - - data := &ValidatorLtFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteIntPointer(b *testing.B) { - var validInput int = 32 - data := &ValidGenLteIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 32 - - data := &ValidatorLteIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt8Pointer(b *testing.B) { - var validInput int8 = 32 - data := &ValidGenLteInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 32 - - data := &ValidatorLteInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt16Pointer(b *testing.B) { - var validInput int16 = 32 - data := &ValidGenLteInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 32 - - data := &ValidatorLteInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt32Pointer(b *testing.B) { - var validInput int32 = 32 - data := &ValidGenLteInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 32 - - data := &ValidatorLteInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteInt64Pointer(b *testing.B) { - var validInput int64 = 32 - data := &ValidGenLteInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 32 - - data := &ValidatorLteInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUintPointer(b *testing.B) { - var validInput uint = 32 - data := &ValidGenLteUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 32 - - data := &ValidatorLteUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint8Pointer(b *testing.B) { - var validInput uint8 = 32 - data := &ValidGenLteUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 32 - - data := &ValidatorLteUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint16Pointer(b *testing.B) { - var validInput uint16 = 32 - data := &ValidGenLteUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 32 - - data := &ValidatorLteUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint32Pointer(b *testing.B) { - var validInput uint32 = 32 - data := &ValidGenLteUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 32 - - data := &ValidatorLteUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteUint64Pointer(b *testing.B) { - var validInput uint64 = 32 - data := &ValidGenLteUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 32 - - data := &ValidatorLteUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteFloat32Pointer(b *testing.B) { - var validInput float32 = 12.34 - data := &ValidGenLteFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteFloat32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteFloat32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float32 = 12.34 - - data := &ValidatorLteFloat32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLteFloat64Pointer(b *testing.B) { - var validInput float64 = 12.34 - data := &ValidGenLteFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLteFloat64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLteFloat64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput float64 = 12.34 - - data := &ValidatorLteFloat64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinStringPointer(b *testing.B) { - var validInput string = "abcde" - data := &ValidGenMinStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "abcde" - - data := &ValidatorMinStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinStringSlicePointer(b *testing.B) { - var validInput []string = []string{"abc", "def"} - data := &ValidGenMinStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinStringSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinStringSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []string = []string{"abc", "def"} - - data := &ValidatorMinStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinIntSlicePointer(b *testing.B) { - var validInput []int = []int{65, 67} - data := &ValidGenMinIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinIntSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinIntSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int = []int{65, 67} - - data := &ValidatorMinIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt8SlicePointer(b *testing.B) { - var validInput []int8 = []int8{65, 67} - data := &ValidGenMinInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int8 = []int8{65, 67} - - data := &ValidatorMinInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt16SlicePointer(b *testing.B) { - var validInput []int16 = []int16{65, 67} - data := &ValidGenMinInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int16 = []int16{65, 67} - - data := &ValidatorMinInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt32SlicePointer(b *testing.B) { - var validInput []int32 = []int32{65, 67} - data := &ValidGenMinInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int32 = []int32{65, 67} - - data := &ValidatorMinInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt64SlicePointer(b *testing.B) { - var validInput []int64 = []int64{65, 67} - data := &ValidGenMinInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int64 = []int64{65, 67} - - data := &ValidatorMinInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUintSlicePointer(b *testing.B) { - var validInput []uint = []uint{65, 67} - data := &ValidGenMinUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUintSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUintSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint = []uint{65, 67} - - data := &ValidatorMinUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint8SlicePointer(b *testing.B) { - var validInput []uint8 = []uint8{65, 67} - data := &ValidGenMinUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint8 = []uint8{65, 67} - - data := &ValidatorMinUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint16SlicePointer(b *testing.B) { - var validInput []uint16 = []uint16{65, 67} - data := &ValidGenMinUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint16 = []uint16{65, 67} - - data := &ValidatorMinUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint32SlicePointer(b *testing.B) { - var validInput []uint32 = []uint32{65, 67} - data := &ValidGenMinUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint32 = []uint32{65, 67} - - data := &ValidatorMinUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint64SlicePointer(b *testing.B) { - var validInput []uint64 = []uint64{65, 67} - data := &ValidGenMinUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint64 = []uint64{65, 67} - - data := &ValidatorMinUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat32SlicePointer(b *testing.B) { - var validInput []float32 = []float32{65.65, 67.67} - data := &ValidGenMinFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinFloat32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float32 = []float32{65.65, 67.67} - - data := &ValidatorMinFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat64SlicePointer(b *testing.B) { - var validInput []float64 = []float64{65.65, 67.67} - data := &ValidGenMinFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinFloat64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float64 = []float64{65.65, 67.67} - - data := &ValidatorMinFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinBoolSlicePointer(b *testing.B) { - var validInput []bool = []bool{true, false} - data := &ValidGenMinBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinBoolSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinBoolSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []bool = []bool{true, false} - - data := &ValidatorMinBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinStringMapPointer(b *testing.B) { - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - data := &ValidGenMinStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinStringMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinStringMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - - data := &ValidatorMinStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinIntMapPointer(b *testing.B) { - var validInput map[int]int = map[int]int{1: 65, 2: 67} - data := &ValidGenMinIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinIntMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinIntMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int]int = map[int]int{1: 65, 2: 67} - - data := &ValidatorMinIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt8MapPointer(b *testing.B) { - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - data := &ValidGenMinInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - - data := &ValidatorMinInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt16MapPointer(b *testing.B) { - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - data := &ValidGenMinInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - - data := &ValidatorMinInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt32MapPointer(b *testing.B) { - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - data := &ValidGenMinInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - - data := &ValidatorMinInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinInt64MapPointer(b *testing.B) { - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - data := &ValidGenMinInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinInt64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinInt64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - - data := &ValidatorMinInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUintMapPointer(b *testing.B) { - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - data := &ValidGenMinUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUintMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUintMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - - data := &ValidatorMinUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint8MapPointer(b *testing.B) { - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - data := &ValidGenMinUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - - data := &ValidatorMinUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint16MapPointer(b *testing.B) { - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - data := &ValidGenMinUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - - data := &ValidatorMinUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint32MapPointer(b *testing.B) { - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - data := &ValidGenMinUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - - data := &ValidatorMinUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinUint64MapPointer(b *testing.B) { - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - data := &ValidGenMinUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinUint64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinUint64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - - data := &ValidatorMinUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat32MapPointer(b *testing.B) { - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - data := &ValidGenMinFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinFloat32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - - data := &ValidatorMinFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinFloat64MapPointer(b *testing.B) { - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - data := &ValidGenMinFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinFloat64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinFloat64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - - data := &ValidatorMinFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMinBoolMapPointer(b *testing.B) { - var validInput map[bool]bool = map[bool]bool{true: true, false: false} - data := &ValidGenMinBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMinBoolMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMinBoolMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[bool]bool = map[bool]bool{true: true, false: false} - - data := &ValidatorMinBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxStringPointer(b *testing.B) { - var validInput string = "abc" - data := &ValidGenMaxStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "abc" - - data := &ValidatorMaxStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxStringSlicePointer(b *testing.B) { - var validInput []string = []string{"abc", "def"} - data := &ValidGenMaxStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxStringSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxStringSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []string = []string{"abc", "def"} - - data := &ValidatorMaxStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxIntSlicePointer(b *testing.B) { - var validInput []int = []int{65, 67} - data := &ValidGenMaxIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxIntSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxIntSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int = []int{65, 67} - - data := &ValidatorMaxIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt8SlicePointer(b *testing.B) { - var validInput []int8 = []int8{65, 67} - data := &ValidGenMaxInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int8 = []int8{65, 67} - - data := &ValidatorMaxInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt16SlicePointer(b *testing.B) { - var validInput []int16 = []int16{65, 67} - data := &ValidGenMaxInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int16 = []int16{65, 67} - - data := &ValidatorMaxInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt32SlicePointer(b *testing.B) { - var validInput []int32 = []int32{65, 67} - data := &ValidGenMaxInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int32 = []int32{65, 67} - - data := &ValidatorMaxInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt64SlicePointer(b *testing.B) { - var validInput []int64 = []int64{65, 67} - data := &ValidGenMaxInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int64 = []int64{65, 67} - - data := &ValidatorMaxInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUintSlicePointer(b *testing.B) { - var validInput []uint = []uint{65, 67} - data := &ValidGenMaxUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUintSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUintSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint = []uint{65, 67} - - data := &ValidatorMaxUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint8SlicePointer(b *testing.B) { - var validInput []uint8 = []uint8{65, 67} - data := &ValidGenMaxUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint8 = []uint8{65, 67} - - data := &ValidatorMaxUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint16SlicePointer(b *testing.B) { - var validInput []uint16 = []uint16{65, 67} - data := &ValidGenMaxUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint16 = []uint16{65, 67} - - data := &ValidatorMaxUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint32SlicePointer(b *testing.B) { - var validInput []uint32 = []uint32{65, 67} - data := &ValidGenMaxUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint32 = []uint32{65, 67} - - data := &ValidatorMaxUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint64SlicePointer(b *testing.B) { - var validInput []uint64 = []uint64{65, 67} - data := &ValidGenMaxUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint64 = []uint64{65, 67} - - data := &ValidatorMaxUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat32SlicePointer(b *testing.B) { - var validInput []float32 = []float32{65.65, 67.67} - data := &ValidGenMaxFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxFloat32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float32 = []float32{65.65, 67.67} - - data := &ValidatorMaxFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat64SlicePointer(b *testing.B) { - var validInput []float64 = []float64{65.65, 67.67} - data := &ValidGenMaxFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxFloat64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float64 = []float64{65.65, 67.67} - - data := &ValidatorMaxFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxBoolSlicePointer(b *testing.B) { - var validInput []bool = []bool{true, false} - data := &ValidGenMaxBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxBoolSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxBoolSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []bool = []bool{true, false} - - data := &ValidatorMaxBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxStringMapPointer(b *testing.B) { - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - data := &ValidGenMaxStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxStringMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxStringMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - - data := &ValidatorMaxStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxIntMapPointer(b *testing.B) { - var validInput map[int]int = map[int]int{1: 65, 2: 67} - data := &ValidGenMaxIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxIntMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxIntMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int]int = map[int]int{1: 65, 2: 67} - - data := &ValidatorMaxIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt8MapPointer(b *testing.B) { - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - data := &ValidGenMaxInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - - data := &ValidatorMaxInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt16MapPointer(b *testing.B) { - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - data := &ValidGenMaxInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - - data := &ValidatorMaxInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt32MapPointer(b *testing.B) { - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - data := &ValidGenMaxInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - - data := &ValidatorMaxInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxInt64MapPointer(b *testing.B) { - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - data := &ValidGenMaxInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxInt64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxInt64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - - data := &ValidatorMaxInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUintMapPointer(b *testing.B) { - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - data := &ValidGenMaxUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUintMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUintMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - - data := &ValidatorMaxUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint8MapPointer(b *testing.B) { - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - data := &ValidGenMaxUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - - data := &ValidatorMaxUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint16MapPointer(b *testing.B) { - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - data := &ValidGenMaxUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - - data := &ValidatorMaxUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint32MapPointer(b *testing.B) { - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - data := &ValidGenMaxUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - - data := &ValidatorMaxUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxUint64MapPointer(b *testing.B) { - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - data := &ValidGenMaxUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxUint64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxUint64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - - data := &ValidatorMaxUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat32MapPointer(b *testing.B) { - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - data := &ValidGenMaxFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxFloat32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - - data := &ValidatorMaxFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxFloat64MapPointer(b *testing.B) { - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - data := &ValidGenMaxFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxFloat64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxFloat64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - - data := &ValidatorMaxFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenMaxBoolMapPointer(b *testing.B) { - var validInput map[bool]bool = map[bool]bool{true: true} - data := &ValidGenMaxBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenMaxBoolMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorMaxBoolMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[bool]bool = map[bool]bool{true: true} - - data := &ValidatorMaxBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenEq_ignore_caseStringPointer(b *testing.B) { - var validInput string = "AbCdE" - data := &ValidGenEq_ignore_caseStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenEq_ignore_caseStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorEq_ignore_caseStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "AbCdE" - - data := &ValidatorEq_ignore_caseStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenNeq_ignore_caseStringPointer(b *testing.B) { - var validInput string = "a1b2c3" - data := &ValidGenNeq_ignore_caseStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenNeq_ignore_caseStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorNeq_ignore_caseStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "a1b2c3" - - data := &ValidatorNeq_ignore_caseStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenStringPointer(b *testing.B) { - var validInput string = "ab" - data := &ValidGenLenStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "ab" - - data := &ValidatorLenStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenStringSlicePointer(b *testing.B) { - var validInput []string = []string{"abc", "def"} - data := &ValidGenLenStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenStringSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenStringSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []string = []string{"abc", "def"} - - data := &ValidatorLenStringSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenIntSlicePointer(b *testing.B) { - var validInput []int = []int{65, 67} - data := &ValidGenLenIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenIntSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenIntSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int = []int{65, 67} - - data := &ValidatorLenIntSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt8SlicePointer(b *testing.B) { - var validInput []int8 = []int8{65, 67} - data := &ValidGenLenInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int8 = []int8{65, 67} - - data := &ValidatorLenInt8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt16SlicePointer(b *testing.B) { - var validInput []int16 = []int16{65, 67} - data := &ValidGenLenInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int16 = []int16{65, 67} - - data := &ValidatorLenInt16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt32SlicePointer(b *testing.B) { - var validInput []int32 = []int32{65, 67} - data := &ValidGenLenInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int32 = []int32{65, 67} - - data := &ValidatorLenInt32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt64SlicePointer(b *testing.B) { - var validInput []int64 = []int64{65, 67} - data := &ValidGenLenInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []int64 = []int64{65, 67} - - data := &ValidatorLenInt64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUintSlicePointer(b *testing.B) { - var validInput []uint = []uint{65, 67} - data := &ValidGenLenUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUintSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUintSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint = []uint{65, 67} - - data := &ValidatorLenUintSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint8SlicePointer(b *testing.B) { - var validInput []uint8 = []uint8{65, 67} - data := &ValidGenLenUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint8SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint8SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint8 = []uint8{65, 67} - - data := &ValidatorLenUint8SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint16SlicePointer(b *testing.B) { - var validInput []uint16 = []uint16{65, 67} - data := &ValidGenLenUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint16SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint16SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint16 = []uint16{65, 67} - - data := &ValidatorLenUint16SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint32SlicePointer(b *testing.B) { - var validInput []uint32 = []uint32{65, 67} - data := &ValidGenLenUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint32 = []uint32{65, 67} - - data := &ValidatorLenUint32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint64SlicePointer(b *testing.B) { - var validInput []uint64 = []uint64{65, 67} - data := &ValidGenLenUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []uint64 = []uint64{65, 67} - - data := &ValidatorLenUint64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat32SlicePointer(b *testing.B) { - var validInput []float32 = []float32{65.65, 67.67} - data := &ValidGenLenFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenFloat32SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat32SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float32 = []float32{65.65, 67.67} - - data := &ValidatorLenFloat32SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat64SlicePointer(b *testing.B) { - var validInput []float64 = []float64{65.65, 67.67} - data := &ValidGenLenFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenFloat64SlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat64SlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []float64 = []float64{65.65, 67.67} - - data := &ValidatorLenFloat64SlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenBoolSlicePointer(b *testing.B) { - var validInput []bool = []bool{true, false} - data := &ValidGenLenBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenBoolSlicePointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenBoolSlicePointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput []bool = []bool{true, false} - - data := &ValidatorLenBoolSlicePointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenStringMapPointer(b *testing.B) { - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - data := &ValidGenLenStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenStringMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenStringMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[string]string = map[string]string{"a": "1", "b": "2"} - - data := &ValidatorLenStringMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenIntMapPointer(b *testing.B) { - var validInput map[int]int = map[int]int{1: 65, 2: 67} - data := &ValidGenLenIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenIntMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenIntMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int]int = map[int]int{1: 65, 2: 67} - - data := &ValidatorLenIntMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt8MapPointer(b *testing.B) { - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - data := &ValidGenLenInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int8]int8 = map[int8]int8{1: 65, 2: 67} - - data := &ValidatorLenInt8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt16MapPointer(b *testing.B) { - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - data := &ValidGenLenInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int16]int16 = map[int16]int16{1: 65, 2: 67} - - data := &ValidatorLenInt16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt32MapPointer(b *testing.B) { - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - data := &ValidGenLenInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int32]int32 = map[int32]int32{1: 65, 2: 67} - - data := &ValidatorLenInt32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenInt64MapPointer(b *testing.B) { - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - data := &ValidGenLenInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenInt64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenInt64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[int64]int64 = map[int64]int64{1: 65, 2: 67} - - data := &ValidatorLenInt64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUintMapPointer(b *testing.B) { - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - data := &ValidGenLenUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUintMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUintMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint]uint = map[uint]uint{1: 65, 2: 67} - - data := &ValidatorLenUintMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint8MapPointer(b *testing.B) { - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - data := &ValidGenLenUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint8MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint8MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint8]uint8 = map[uint8]uint8{1: 65, 2: 67} - - data := &ValidatorLenUint8MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint16MapPointer(b *testing.B) { - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - data := &ValidGenLenUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint16MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint16MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint16]uint16 = map[uint16]uint16{1: 65, 2: 67} - - data := &ValidatorLenUint16MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint32MapPointer(b *testing.B) { - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - data := &ValidGenLenUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint32]uint32 = map[uint32]uint32{1: 65, 2: 67} - - data := &ValidatorLenUint32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenUint64MapPointer(b *testing.B) { - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - data := &ValidGenLenUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenUint64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenUint64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[uint64]uint64 = map[uint64]uint64{1: 65, 2: 67} - - data := &ValidatorLenUint64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat32MapPointer(b *testing.B) { - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - data := &ValidGenLenFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenFloat32MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat32MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float32]float32 = map[float32]float32{1: 65.65, 2: 67.67} - - data := &ValidatorLenFloat32MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenFloat64MapPointer(b *testing.B) { - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - data := &ValidGenLenFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenFloat64MapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenFloat64MapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[float64]float64 = map[float64]float64{1: 65.65, 2: 67.67} - - data := &ValidatorLenFloat64MapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenLenBoolMapPointer(b *testing.B) { - var validInput map[bool]bool = map[bool]bool{true: true, false: false} - data := &ValidGenLenBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenLenBoolMapPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorLenBoolMapPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput map[bool]bool = map[bool]bool{true: true, false: false} - - data := &ValidatorLenBoolMapPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInStringPointer(b *testing.B) { - var validInput string = "cd" - data := &ValidGenInStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInStringPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInStringPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput string = "cd" - - data := &ValidatorInStringPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInIntPointer(b *testing.B) { - var validInput int = 34 - data := &ValidGenInIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInIntPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInIntPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int = 34 - - data := &ValidatorInIntPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt8Pointer(b *testing.B) { - var validInput int8 = 34 - data := &ValidGenInInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInInt8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int8 = 34 - - data := &ValidatorInInt8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt16Pointer(b *testing.B) { - var validInput int16 = 34 - data := &ValidGenInInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInInt16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int16 = 34 - - data := &ValidatorInInt16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt32Pointer(b *testing.B) { - var validInput int32 = 34 - data := &ValidGenInInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInInt32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int32 = 34 - - data := &ValidatorInInt32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInInt64Pointer(b *testing.B) { - var validInput int64 = 34 - data := &ValidGenInInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInInt64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInInt64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput int64 = 34 - - data := &ValidatorInInt64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUintPointer(b *testing.B) { - var validInput uint = 34 - data := &ValidGenInUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInUintPointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUintPointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint = 34 - - data := &ValidatorInUintPointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint8Pointer(b *testing.B) { - var validInput uint8 = 34 - data := &ValidGenInUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInUint8PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint8Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint8 = 34 - - data := &ValidatorInUint8PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint16Pointer(b *testing.B) { - var validInput uint16 = 34 - data := &ValidGenInUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInUint16PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint16Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint16 = 34 - - data := &ValidatorInUint16PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint32Pointer(b *testing.B) { - var validInput uint32 = 34 - data := &ValidGenInUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInUint32PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint32Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint32 = 34 - - data := &ValidatorInUint32PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} - -func BenchmarkValidGenInUint64Pointer(b *testing.B) { - var validInput uint64 = 34 - data := &ValidGenInUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := ValidGenInUint64PointerStructValidate(data); len(err) > 0 { - b.FailNow() - } - } -} - -func BenchmarkValidatorInUint64Pointer(b *testing.B) { - var validate *validator.Validate - - validate = validator.New(validator.WithRequiredStructEnabled()) - - var validInput uint64 = 34 - - data := &ValidatorInUint64PointerStruct{ - Field: &validInput, - } - - for b.Loop() { - if err := validate.Struct(data); err != nil { - b.FailNow() - } - } -} diff --git a/tests/cmpbenchtests/validator__.go b/tests/cmpbenchtests/validator__.go deleted file mode 100755 index cabe7dd..0000000 --- a/tests/cmpbenchtests/validator__.go +++ /dev/null @@ -1,6339 +0,0 @@ -// Code generated by ValidGen. DO NOT EDIT. - -//nolint:all -package benchtests - -import ( - "strings" - - "github.com/opencodeco/validgen/types" -) - -func ValidGenEmailStringPointerStructValidate(obj *ValidGenEmailStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && types.IsValidEmail(*obj.Field)) { - errs = append(errs, types.NewValidationError("Field must be a valid email")) - } - return errs -} -func ValidGenEmailStringStructValidate(obj *ValidGenEmailStringStruct) []error { - var errs []error - if !(types.IsValidEmail(obj.Field)) { - errs = append(errs, types.NewValidationError("Field must be a valid email")) - } - return errs -} -func ValidGenEqBoolPointerStructValidate(obj *ValidGenEqBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == true) { - errs = append(errs, types.NewValidationError("Field must be equal to true")) - } - return errs -} -func ValidGenEqBoolStructValidate(obj *ValidGenEqBoolStruct) []error { - var errs []error - if !(obj.Field == true) { - errs = append(errs, types.NewValidationError("Field must be equal to true")) - } - return errs -} -func ValidGenEqFloat32PointerStructValidate(obj *ValidGenEqFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidGenEqFloat32StructValidate(obj *ValidGenEqFloat32Struct) []error { - var errs []error - if !(obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidGenEqFloat64PointerStructValidate(obj *ValidGenEqFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidGenEqFloat64StructValidate(obj *ValidGenEqFloat64Struct) []error { - var errs []error - if !(obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidGenEqInt16PointerStructValidate(obj *ValidGenEqInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt16StructValidate(obj *ValidGenEqInt16Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt32PointerStructValidate(obj *ValidGenEqInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt32StructValidate(obj *ValidGenEqInt32Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt64PointerStructValidate(obj *ValidGenEqInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt64StructValidate(obj *ValidGenEqInt64Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt8PointerStructValidate(obj *ValidGenEqInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqInt8StructValidate(obj *ValidGenEqInt8Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqIntPointerStructValidate(obj *ValidGenEqIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqIntStructValidate(obj *ValidGenEqIntStruct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqStringPointerStructValidate(obj *ValidGenEqStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == "abcde") { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidGenEqStringStructValidate(obj *ValidGenEqStringStruct) []error { - var errs []error - if !(obj.Field == "abcde") { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidGenEqUint16PointerStructValidate(obj *ValidGenEqUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint16StructValidate(obj *ValidGenEqUint16Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint32PointerStructValidate(obj *ValidGenEqUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint32StructValidate(obj *ValidGenEqUint32Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint64PointerStructValidate(obj *ValidGenEqUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint64StructValidate(obj *ValidGenEqUint64Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint8PointerStructValidate(obj *ValidGenEqUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUint8StructValidate(obj *ValidGenEqUint8Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUintPointerStructValidate(obj *ValidGenEqUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEqUintStructValidate(obj *ValidGenEqUintStruct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidGenEq_ignore_caseStringPointerStructValidate(obj *ValidGenEq_ignore_caseStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && strings.EqualFold(*obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidGenEq_ignore_caseStringStructValidate(obj *ValidGenEq_ignore_caseStringStruct) []error { - var errs []error - if !(strings.EqualFold(obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidGenGtFloat32PointerStructValidate(obj *ValidGenGtFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidGenGtFloat32StructValidate(obj *ValidGenGtFloat32Struct) []error { - var errs []error - if !(obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidGenGtFloat64PointerStructValidate(obj *ValidGenGtFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidGenGtFloat64StructValidate(obj *ValidGenGtFloat64Struct) []error { - var errs []error - if !(obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidGenGtInt16PointerStructValidate(obj *ValidGenGtInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt16StructValidate(obj *ValidGenGtInt16Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt32PointerStructValidate(obj *ValidGenGtInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt32StructValidate(obj *ValidGenGtInt32Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt64PointerStructValidate(obj *ValidGenGtInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt64StructValidate(obj *ValidGenGtInt64Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt8PointerStructValidate(obj *ValidGenGtInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtInt8StructValidate(obj *ValidGenGtInt8Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtIntPointerStructValidate(obj *ValidGenGtIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtIntStructValidate(obj *ValidGenGtIntStruct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint16PointerStructValidate(obj *ValidGenGtUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint16StructValidate(obj *ValidGenGtUint16Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint32PointerStructValidate(obj *ValidGenGtUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint32StructValidate(obj *ValidGenGtUint32Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint64PointerStructValidate(obj *ValidGenGtUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint64StructValidate(obj *ValidGenGtUint64Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint8PointerStructValidate(obj *ValidGenGtUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUint8StructValidate(obj *ValidGenGtUint8Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUintPointerStructValidate(obj *ValidGenGtUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGtUintStructValidate(obj *ValidGenGtUintStruct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidGenGteFloat32PointerStructValidate(obj *ValidGenGteFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidGenGteFloat32StructValidate(obj *ValidGenGteFloat32Struct) []error { - var errs []error - if !(obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidGenGteFloat64PointerStructValidate(obj *ValidGenGteFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidGenGteFloat64StructValidate(obj *ValidGenGteFloat64Struct) []error { - var errs []error - if !(obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidGenGteInt16PointerStructValidate(obj *ValidGenGteInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt16StructValidate(obj *ValidGenGteInt16Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt32PointerStructValidate(obj *ValidGenGteInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt32StructValidate(obj *ValidGenGteInt32Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt64PointerStructValidate(obj *ValidGenGteInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt64StructValidate(obj *ValidGenGteInt64Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt8PointerStructValidate(obj *ValidGenGteInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteInt8StructValidate(obj *ValidGenGteInt8Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteIntPointerStructValidate(obj *ValidGenGteIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteIntStructValidate(obj *ValidGenGteIntStruct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint16PointerStructValidate(obj *ValidGenGteUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint16StructValidate(obj *ValidGenGteUint16Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint32PointerStructValidate(obj *ValidGenGteUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint32StructValidate(obj *ValidGenGteUint32Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint64PointerStructValidate(obj *ValidGenGteUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint64StructValidate(obj *ValidGenGteUint64Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint8PointerStructValidate(obj *ValidGenGteUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUint8StructValidate(obj *ValidGenGteUint8Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUintPointerStructValidate(obj *ValidGenGteUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenGteUintStructValidate(obj *ValidGenGteUintStruct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidGenInInt16PointerStructValidate(obj *ValidGenInInt16PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt16StructValidate(obj *ValidGenInInt16Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt32PointerStructValidate(obj *ValidGenInInt32PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt32StructValidate(obj *ValidGenInInt32Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt64PointerStructValidate(obj *ValidGenInInt64PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt64StructValidate(obj *ValidGenInInt64Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt8PointerStructValidate(obj *ValidGenInInt8PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInInt8StructValidate(obj *ValidGenInInt8Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInIntPointerStructValidate(obj *ValidGenInIntPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInIntStructValidate(obj *ValidGenInIntStruct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInStringPointerStructValidate(obj *ValidGenInStringPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == "ab") || (obj.Field != nil && *obj.Field == "cd") || (obj.Field != nil && *obj.Field == "ef")) { - errs = append(errs, types.NewValidationError("Field must be one of 'ab' 'cd' 'ef'")) - } - return errs -} -func ValidGenInStringStructValidate(obj *ValidGenInStringStruct) []error { - var errs []error - if !(obj.Field == "ab" || obj.Field == "cd" || obj.Field == "ef") { - errs = append(errs, types.NewValidationError("Field must be one of 'ab' 'cd' 'ef'")) - } - return errs -} -func ValidGenInUint16PointerStructValidate(obj *ValidGenInUint16PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint16StructValidate(obj *ValidGenInUint16Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint32PointerStructValidate(obj *ValidGenInUint32PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint32StructValidate(obj *ValidGenInUint32Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint64PointerStructValidate(obj *ValidGenInUint64PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint64StructValidate(obj *ValidGenInUint64Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint8PointerStructValidate(obj *ValidGenInUint8PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUint8StructValidate(obj *ValidGenInUint8Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUintPointerStructValidate(obj *ValidGenInUintPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenInUintStructValidate(obj *ValidGenInUintStruct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidGenLenBoolMapPointerStructValidate(obj *ValidGenLenBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenBoolMapStructValidate(obj *ValidGenLenBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenBoolSlicePointerStructValidate(obj *ValidGenLenBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenBoolSliceStructValidate(obj *ValidGenLenBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat32MapPointerStructValidate(obj *ValidGenLenFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat32MapStructValidate(obj *ValidGenLenFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat32SlicePointerStructValidate(obj *ValidGenLenFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat32SliceStructValidate(obj *ValidGenLenFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat64MapPointerStructValidate(obj *ValidGenLenFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat64MapStructValidate(obj *ValidGenLenFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat64SlicePointerStructValidate(obj *ValidGenLenFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenFloat64SliceStructValidate(obj *ValidGenLenFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt16MapPointerStructValidate(obj *ValidGenLenInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt16MapStructValidate(obj *ValidGenLenInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt16SlicePointerStructValidate(obj *ValidGenLenInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt16SliceStructValidate(obj *ValidGenLenInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt32MapPointerStructValidate(obj *ValidGenLenInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt32MapStructValidate(obj *ValidGenLenInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt32SlicePointerStructValidate(obj *ValidGenLenInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt32SliceStructValidate(obj *ValidGenLenInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt64MapPointerStructValidate(obj *ValidGenLenInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt64MapStructValidate(obj *ValidGenLenInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt64SlicePointerStructValidate(obj *ValidGenLenInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt64SliceStructValidate(obj *ValidGenLenInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt8MapPointerStructValidate(obj *ValidGenLenInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt8MapStructValidate(obj *ValidGenLenInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt8SlicePointerStructValidate(obj *ValidGenLenInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenInt8SliceStructValidate(obj *ValidGenLenInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenIntMapPointerStructValidate(obj *ValidGenLenIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenIntMapStructValidate(obj *ValidGenLenIntMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenIntSlicePointerStructValidate(obj *ValidGenLenIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenIntSliceStructValidate(obj *ValidGenLenIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenStringMapPointerStructValidate(obj *ValidGenLenStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenStringMapStructValidate(obj *ValidGenLenStringMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenStringPointerStructValidate(obj *ValidGenLenStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field length must be 2")) - } - return errs -} -func ValidGenLenStringSlicePointerStructValidate(obj *ValidGenLenStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenStringSliceStructValidate(obj *ValidGenLenStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenStringStructValidate(obj *ValidGenLenStringStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field length must be 2")) - } - return errs -} -func ValidGenLenUint16MapPointerStructValidate(obj *ValidGenLenUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint16MapStructValidate(obj *ValidGenLenUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint16SlicePointerStructValidate(obj *ValidGenLenUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint16SliceStructValidate(obj *ValidGenLenUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint32MapPointerStructValidate(obj *ValidGenLenUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint32MapStructValidate(obj *ValidGenLenUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint32SlicePointerStructValidate(obj *ValidGenLenUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint32SliceStructValidate(obj *ValidGenLenUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint64MapPointerStructValidate(obj *ValidGenLenUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint64MapStructValidate(obj *ValidGenLenUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint64SlicePointerStructValidate(obj *ValidGenLenUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint64SliceStructValidate(obj *ValidGenLenUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint8MapPointerStructValidate(obj *ValidGenLenUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint8MapStructValidate(obj *ValidGenLenUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint8SlicePointerStructValidate(obj *ValidGenLenUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUint8SliceStructValidate(obj *ValidGenLenUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUintMapPointerStructValidate(obj *ValidGenLenUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUintMapStructValidate(obj *ValidGenLenUintMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUintSlicePointerStructValidate(obj *ValidGenLenUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLenUintSliceStructValidate(obj *ValidGenLenUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidGenLtFloat32PointerStructValidate(obj *ValidGenLtFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidGenLtFloat32StructValidate(obj *ValidGenLtFloat32Struct) []error { - var errs []error - if !(obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidGenLtFloat64PointerStructValidate(obj *ValidGenLtFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidGenLtFloat64StructValidate(obj *ValidGenLtFloat64Struct) []error { - var errs []error - if !(obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidGenLtInt16PointerStructValidate(obj *ValidGenLtInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt16StructValidate(obj *ValidGenLtInt16Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt32PointerStructValidate(obj *ValidGenLtInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt32StructValidate(obj *ValidGenLtInt32Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt64PointerStructValidate(obj *ValidGenLtInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt64StructValidate(obj *ValidGenLtInt64Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt8PointerStructValidate(obj *ValidGenLtInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtInt8StructValidate(obj *ValidGenLtInt8Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtIntPointerStructValidate(obj *ValidGenLtIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtIntStructValidate(obj *ValidGenLtIntStruct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint16PointerStructValidate(obj *ValidGenLtUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint16StructValidate(obj *ValidGenLtUint16Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint32PointerStructValidate(obj *ValidGenLtUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint32StructValidate(obj *ValidGenLtUint32Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint64PointerStructValidate(obj *ValidGenLtUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint64StructValidate(obj *ValidGenLtUint64Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint8PointerStructValidate(obj *ValidGenLtUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUint8StructValidate(obj *ValidGenLtUint8Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUintPointerStructValidate(obj *ValidGenLtUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLtUintStructValidate(obj *ValidGenLtUintStruct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidGenLteFloat32PointerStructValidate(obj *ValidGenLteFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidGenLteFloat32StructValidate(obj *ValidGenLteFloat32Struct) []error { - var errs []error - if !(obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidGenLteFloat64PointerStructValidate(obj *ValidGenLteFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidGenLteFloat64StructValidate(obj *ValidGenLteFloat64Struct) []error { - var errs []error - if !(obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidGenLteInt16PointerStructValidate(obj *ValidGenLteInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt16StructValidate(obj *ValidGenLteInt16Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt32PointerStructValidate(obj *ValidGenLteInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt32StructValidate(obj *ValidGenLteInt32Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt64PointerStructValidate(obj *ValidGenLteInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt64StructValidate(obj *ValidGenLteInt64Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt8PointerStructValidate(obj *ValidGenLteInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteInt8StructValidate(obj *ValidGenLteInt8Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteIntPointerStructValidate(obj *ValidGenLteIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteIntStructValidate(obj *ValidGenLteIntStruct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint16PointerStructValidate(obj *ValidGenLteUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint16StructValidate(obj *ValidGenLteUint16Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint32PointerStructValidate(obj *ValidGenLteUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint32StructValidate(obj *ValidGenLteUint32Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint64PointerStructValidate(obj *ValidGenLteUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint64StructValidate(obj *ValidGenLteUint64Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint8PointerStructValidate(obj *ValidGenLteUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUint8StructValidate(obj *ValidGenLteUint8Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUintPointerStructValidate(obj *ValidGenLteUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenLteUintStructValidate(obj *ValidGenLteUintStruct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidGenMaxBoolMapPointerStructValidate(obj *ValidGenMaxBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 1) { - errs = append(errs, types.NewValidationError("Field must have at most 1 elements")) - } - return errs -} -func ValidGenMaxBoolMapStructValidate(obj *ValidGenMaxBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 1) { - errs = append(errs, types.NewValidationError("Field must have at most 1 elements")) - } - return errs -} -func ValidGenMaxBoolSlicePointerStructValidate(obj *ValidGenMaxBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxBoolSliceStructValidate(obj *ValidGenMaxBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat32MapPointerStructValidate(obj *ValidGenMaxFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat32MapStructValidate(obj *ValidGenMaxFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat32SlicePointerStructValidate(obj *ValidGenMaxFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat32SliceStructValidate(obj *ValidGenMaxFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat64MapPointerStructValidate(obj *ValidGenMaxFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat64MapStructValidate(obj *ValidGenMaxFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat64SlicePointerStructValidate(obj *ValidGenMaxFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxFloat64SliceStructValidate(obj *ValidGenMaxFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt16MapPointerStructValidate(obj *ValidGenMaxInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt16MapStructValidate(obj *ValidGenMaxInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt16SlicePointerStructValidate(obj *ValidGenMaxInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt16SliceStructValidate(obj *ValidGenMaxInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt32MapPointerStructValidate(obj *ValidGenMaxInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt32MapStructValidate(obj *ValidGenMaxInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt32SlicePointerStructValidate(obj *ValidGenMaxInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt32SliceStructValidate(obj *ValidGenMaxInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt64MapPointerStructValidate(obj *ValidGenMaxInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt64MapStructValidate(obj *ValidGenMaxInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt64SlicePointerStructValidate(obj *ValidGenMaxInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt64SliceStructValidate(obj *ValidGenMaxInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt8MapPointerStructValidate(obj *ValidGenMaxInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt8MapStructValidate(obj *ValidGenMaxInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt8SlicePointerStructValidate(obj *ValidGenMaxInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxInt8SliceStructValidate(obj *ValidGenMaxInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxIntMapPointerStructValidate(obj *ValidGenMaxIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxIntMapStructValidate(obj *ValidGenMaxIntMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxIntSlicePointerStructValidate(obj *ValidGenMaxIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxIntSliceStructValidate(obj *ValidGenMaxIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxStringMapPointerStructValidate(obj *ValidGenMaxStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxStringMapStructValidate(obj *ValidGenMaxStringMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxStringPointerStructValidate(obj *ValidGenMaxStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 3) { - errs = append(errs, types.NewValidationError("Field length must be <= 3")) - } - return errs -} -func ValidGenMaxStringSlicePointerStructValidate(obj *ValidGenMaxStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxStringSliceStructValidate(obj *ValidGenMaxStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxStringStructValidate(obj *ValidGenMaxStringStruct) []error { - var errs []error - if !(len(obj.Field) <= 3) { - errs = append(errs, types.NewValidationError("Field length must be <= 3")) - } - return errs -} -func ValidGenMaxUint16MapPointerStructValidate(obj *ValidGenMaxUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint16MapStructValidate(obj *ValidGenMaxUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint16SlicePointerStructValidate(obj *ValidGenMaxUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint16SliceStructValidate(obj *ValidGenMaxUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint32MapPointerStructValidate(obj *ValidGenMaxUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint32MapStructValidate(obj *ValidGenMaxUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint32SlicePointerStructValidate(obj *ValidGenMaxUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint32SliceStructValidate(obj *ValidGenMaxUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint64MapPointerStructValidate(obj *ValidGenMaxUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint64MapStructValidate(obj *ValidGenMaxUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint64SlicePointerStructValidate(obj *ValidGenMaxUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint64SliceStructValidate(obj *ValidGenMaxUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint8MapPointerStructValidate(obj *ValidGenMaxUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint8MapStructValidate(obj *ValidGenMaxUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint8SlicePointerStructValidate(obj *ValidGenMaxUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUint8SliceStructValidate(obj *ValidGenMaxUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUintMapPointerStructValidate(obj *ValidGenMaxUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUintMapStructValidate(obj *ValidGenMaxUintMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUintSlicePointerStructValidate(obj *ValidGenMaxUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMaxUintSliceStructValidate(obj *ValidGenMaxUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidGenMinBoolMapPointerStructValidate(obj *ValidGenMinBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinBoolMapStructValidate(obj *ValidGenMinBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinBoolSlicePointerStructValidate(obj *ValidGenMinBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinBoolSliceStructValidate(obj *ValidGenMinBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat32MapPointerStructValidate(obj *ValidGenMinFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat32MapStructValidate(obj *ValidGenMinFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat32SlicePointerStructValidate(obj *ValidGenMinFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat32SliceStructValidate(obj *ValidGenMinFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat64MapPointerStructValidate(obj *ValidGenMinFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat64MapStructValidate(obj *ValidGenMinFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat64SlicePointerStructValidate(obj *ValidGenMinFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinFloat64SliceStructValidate(obj *ValidGenMinFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt16MapPointerStructValidate(obj *ValidGenMinInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt16MapStructValidate(obj *ValidGenMinInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt16SlicePointerStructValidate(obj *ValidGenMinInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt16SliceStructValidate(obj *ValidGenMinInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt32MapPointerStructValidate(obj *ValidGenMinInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt32MapStructValidate(obj *ValidGenMinInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt32SlicePointerStructValidate(obj *ValidGenMinInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt32SliceStructValidate(obj *ValidGenMinInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt64MapPointerStructValidate(obj *ValidGenMinInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt64MapStructValidate(obj *ValidGenMinInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt64SlicePointerStructValidate(obj *ValidGenMinInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt64SliceStructValidate(obj *ValidGenMinInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt8MapPointerStructValidate(obj *ValidGenMinInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt8MapStructValidate(obj *ValidGenMinInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt8SlicePointerStructValidate(obj *ValidGenMinInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinInt8SliceStructValidate(obj *ValidGenMinInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinIntMapPointerStructValidate(obj *ValidGenMinIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinIntMapStructValidate(obj *ValidGenMinIntMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinIntSlicePointerStructValidate(obj *ValidGenMinIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinIntSliceStructValidate(obj *ValidGenMinIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinStringMapPointerStructValidate(obj *ValidGenMinStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinStringMapStructValidate(obj *ValidGenMinStringMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinStringPointerStructValidate(obj *ValidGenMinStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 5) { - errs = append(errs, types.NewValidationError("Field length must be >= 5")) - } - return errs -} -func ValidGenMinStringSlicePointerStructValidate(obj *ValidGenMinStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinStringSliceStructValidate(obj *ValidGenMinStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinStringStructValidate(obj *ValidGenMinStringStruct) []error { - var errs []error - if !(len(obj.Field) >= 5) { - errs = append(errs, types.NewValidationError("Field length must be >= 5")) - } - return errs -} -func ValidGenMinUint16MapPointerStructValidate(obj *ValidGenMinUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint16MapStructValidate(obj *ValidGenMinUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint16SlicePointerStructValidate(obj *ValidGenMinUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint16SliceStructValidate(obj *ValidGenMinUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint32MapPointerStructValidate(obj *ValidGenMinUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint32MapStructValidate(obj *ValidGenMinUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint32SlicePointerStructValidate(obj *ValidGenMinUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint32SliceStructValidate(obj *ValidGenMinUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint64MapPointerStructValidate(obj *ValidGenMinUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint64MapStructValidate(obj *ValidGenMinUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint64SlicePointerStructValidate(obj *ValidGenMinUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint64SliceStructValidate(obj *ValidGenMinUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint8MapPointerStructValidate(obj *ValidGenMinUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint8MapStructValidate(obj *ValidGenMinUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint8SlicePointerStructValidate(obj *ValidGenMinUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUint8SliceStructValidate(obj *ValidGenMinUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUintMapPointerStructValidate(obj *ValidGenMinUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUintMapStructValidate(obj *ValidGenMinUintMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUintSlicePointerStructValidate(obj *ValidGenMinUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenMinUintSliceStructValidate(obj *ValidGenMinUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidGenNeqBoolPointerStructValidate(obj *ValidGenNeqBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != true) { - errs = append(errs, types.NewValidationError("Field must not be equal to true")) - } - return errs -} -func ValidGenNeqBoolStructValidate(obj *ValidGenNeqBoolStruct) []error { - var errs []error - if !(obj.Field != true) { - errs = append(errs, types.NewValidationError("Field must not be equal to true")) - } - return errs -} -func ValidGenNeqFloat32PointerStructValidate(obj *ValidGenNeqFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidGenNeqFloat32StructValidate(obj *ValidGenNeqFloat32Struct) []error { - var errs []error - if !(obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidGenNeqFloat64PointerStructValidate(obj *ValidGenNeqFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidGenNeqFloat64StructValidate(obj *ValidGenNeqFloat64Struct) []error { - var errs []error - if !(obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidGenNeqInt16PointerStructValidate(obj *ValidGenNeqInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt16StructValidate(obj *ValidGenNeqInt16Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt32PointerStructValidate(obj *ValidGenNeqInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt32StructValidate(obj *ValidGenNeqInt32Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt64PointerStructValidate(obj *ValidGenNeqInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt64StructValidate(obj *ValidGenNeqInt64Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt8PointerStructValidate(obj *ValidGenNeqInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqInt8StructValidate(obj *ValidGenNeqInt8Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqIntPointerStructValidate(obj *ValidGenNeqIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqIntStructValidate(obj *ValidGenNeqIntStruct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqStringPointerStructValidate(obj *ValidGenNeqStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != "abcde") { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidGenNeqStringStructValidate(obj *ValidGenNeqStringStruct) []error { - var errs []error - if !(obj.Field != "abcde") { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidGenNeqUint16PointerStructValidate(obj *ValidGenNeqUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint16StructValidate(obj *ValidGenNeqUint16Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint32PointerStructValidate(obj *ValidGenNeqUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint32StructValidate(obj *ValidGenNeqUint32Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint64PointerStructValidate(obj *ValidGenNeqUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint64StructValidate(obj *ValidGenNeqUint64Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint8PointerStructValidate(obj *ValidGenNeqUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUint8StructValidate(obj *ValidGenNeqUint8Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUintPointerStructValidate(obj *ValidGenNeqUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeqUintStructValidate(obj *ValidGenNeqUintStruct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidGenNeq_ignore_caseStringPointerStructValidate(obj *ValidGenNeq_ignore_caseStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && !strings.EqualFold(*obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidGenNeq_ignore_caseStringStructValidate(obj *ValidGenNeq_ignore_caseStringStruct) []error { - var errs []error - if !(!strings.EqualFold(obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidGenRequiredBoolArrayPointerStructValidate(obj *ValidGenRequiredBoolArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredBoolMapPointerStructValidate(obj *ValidGenRequiredBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredBoolMapStructValidate(obj *ValidGenRequiredBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredBoolPointerStructValidate(obj *ValidGenRequiredBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != false) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredBoolSlicePointerStructValidate(obj *ValidGenRequiredBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredBoolSliceStructValidate(obj *ValidGenRequiredBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredBoolStructValidate(obj *ValidGenRequiredBoolStruct) []error { - var errs []error - if !(obj.Field != false) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredFloat32ArrayPointerStructValidate(obj *ValidGenRequiredFloat32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat32MapPointerStructValidate(obj *ValidGenRequiredFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat32MapStructValidate(obj *ValidGenRequiredFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat32PointerStructValidate(obj *ValidGenRequiredFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredFloat32SlicePointerStructValidate(obj *ValidGenRequiredFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat32SliceStructValidate(obj *ValidGenRequiredFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat32StructValidate(obj *ValidGenRequiredFloat32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredFloat64ArrayPointerStructValidate(obj *ValidGenRequiredFloat64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat64MapPointerStructValidate(obj *ValidGenRequiredFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat64MapStructValidate(obj *ValidGenRequiredFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat64PointerStructValidate(obj *ValidGenRequiredFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredFloat64SlicePointerStructValidate(obj *ValidGenRequiredFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat64SliceStructValidate(obj *ValidGenRequiredFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredFloat64StructValidate(obj *ValidGenRequiredFloat64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt16ArrayPointerStructValidate(obj *ValidGenRequiredInt16ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt16MapPointerStructValidate(obj *ValidGenRequiredInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt16MapStructValidate(obj *ValidGenRequiredInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt16PointerStructValidate(obj *ValidGenRequiredInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt16SlicePointerStructValidate(obj *ValidGenRequiredInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt16SliceStructValidate(obj *ValidGenRequiredInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt16StructValidate(obj *ValidGenRequiredInt16Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt32ArrayPointerStructValidate(obj *ValidGenRequiredInt32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt32MapPointerStructValidate(obj *ValidGenRequiredInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt32MapStructValidate(obj *ValidGenRequiredInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt32PointerStructValidate(obj *ValidGenRequiredInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt32SlicePointerStructValidate(obj *ValidGenRequiredInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt32SliceStructValidate(obj *ValidGenRequiredInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt32StructValidate(obj *ValidGenRequiredInt32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt64ArrayPointerStructValidate(obj *ValidGenRequiredInt64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt64MapPointerStructValidate(obj *ValidGenRequiredInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt64MapStructValidate(obj *ValidGenRequiredInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt64PointerStructValidate(obj *ValidGenRequiredInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt64SlicePointerStructValidate(obj *ValidGenRequiredInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt64SliceStructValidate(obj *ValidGenRequiredInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt64StructValidate(obj *ValidGenRequiredInt64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt8ArrayPointerStructValidate(obj *ValidGenRequiredInt8ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt8MapPointerStructValidate(obj *ValidGenRequiredInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt8MapStructValidate(obj *ValidGenRequiredInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt8PointerStructValidate(obj *ValidGenRequiredInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredInt8SlicePointerStructValidate(obj *ValidGenRequiredInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt8SliceStructValidate(obj *ValidGenRequiredInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredInt8StructValidate(obj *ValidGenRequiredInt8Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredIntArrayPointerStructValidate(obj *ValidGenRequiredIntArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredIntMapPointerStructValidate(obj *ValidGenRequiredIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredIntMapStructValidate(obj *ValidGenRequiredIntMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredIntPointerStructValidate(obj *ValidGenRequiredIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredIntSlicePointerStructValidate(obj *ValidGenRequiredIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredIntSliceStructValidate(obj *ValidGenRequiredIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredIntStructValidate(obj *ValidGenRequiredIntStruct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredStringArrayPointerStructValidate(obj *ValidGenRequiredStringArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredStringMapPointerStructValidate(obj *ValidGenRequiredStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredStringMapStructValidate(obj *ValidGenRequiredStringMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredStringPointerStructValidate(obj *ValidGenRequiredStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != "") { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredStringSlicePointerStructValidate(obj *ValidGenRequiredStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredStringSliceStructValidate(obj *ValidGenRequiredStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredStringStructValidate(obj *ValidGenRequiredStringStruct) []error { - var errs []error - if !(obj.Field != "") { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint16ArrayPointerStructValidate(obj *ValidGenRequiredUint16ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint16MapPointerStructValidate(obj *ValidGenRequiredUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint16MapStructValidate(obj *ValidGenRequiredUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint16PointerStructValidate(obj *ValidGenRequiredUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint16SlicePointerStructValidate(obj *ValidGenRequiredUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint16SliceStructValidate(obj *ValidGenRequiredUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint16StructValidate(obj *ValidGenRequiredUint16Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint32ArrayPointerStructValidate(obj *ValidGenRequiredUint32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint32MapPointerStructValidate(obj *ValidGenRequiredUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint32MapStructValidate(obj *ValidGenRequiredUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint32PointerStructValidate(obj *ValidGenRequiredUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint32SlicePointerStructValidate(obj *ValidGenRequiredUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint32SliceStructValidate(obj *ValidGenRequiredUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint32StructValidate(obj *ValidGenRequiredUint32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint64ArrayPointerStructValidate(obj *ValidGenRequiredUint64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint64MapPointerStructValidate(obj *ValidGenRequiredUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint64MapStructValidate(obj *ValidGenRequiredUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint64PointerStructValidate(obj *ValidGenRequiredUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint64SlicePointerStructValidate(obj *ValidGenRequiredUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint64SliceStructValidate(obj *ValidGenRequiredUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint64StructValidate(obj *ValidGenRequiredUint64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint8ArrayPointerStructValidate(obj *ValidGenRequiredUint8ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint8MapPointerStructValidate(obj *ValidGenRequiredUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint8MapStructValidate(obj *ValidGenRequiredUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint8PointerStructValidate(obj *ValidGenRequiredUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUint8SlicePointerStructValidate(obj *ValidGenRequiredUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint8SliceStructValidate(obj *ValidGenRequiredUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUint8StructValidate(obj *ValidGenRequiredUint8Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUintArrayPointerStructValidate(obj *ValidGenRequiredUintArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUintMapPointerStructValidate(obj *ValidGenRequiredUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUintMapStructValidate(obj *ValidGenRequiredUintMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUintPointerStructValidate(obj *ValidGenRequiredUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidGenRequiredUintSlicePointerStructValidate(obj *ValidGenRequiredUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUintSliceStructValidate(obj *ValidGenRequiredUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidGenRequiredUintStructValidate(obj *ValidGenRequiredUintStruct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorEmailStringPointerStructValidate(obj *ValidatorEmailStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && types.IsValidEmail(*obj.Field)) { - errs = append(errs, types.NewValidationError("Field must be a valid email")) - } - return errs -} -func ValidatorEmailStringStructValidate(obj *ValidatorEmailStringStruct) []error { - var errs []error - if !(types.IsValidEmail(obj.Field)) { - errs = append(errs, types.NewValidationError("Field must be a valid email")) - } - return errs -} -func ValidatorEqBoolPointerStructValidate(obj *ValidatorEqBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == true) { - errs = append(errs, types.NewValidationError("Field must be equal to true")) - } - return errs -} -func ValidatorEqBoolStructValidate(obj *ValidatorEqBoolStruct) []error { - var errs []error - if !(obj.Field == true) { - errs = append(errs, types.NewValidationError("Field must be equal to true")) - } - return errs -} -func ValidatorEqFloat32PointerStructValidate(obj *ValidatorEqFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidatorEqFloat32StructValidate(obj *ValidatorEqFloat32Struct) []error { - var errs []error - if !(obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidatorEqFloat64PointerStructValidate(obj *ValidatorEqFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidatorEqFloat64StructValidate(obj *ValidatorEqFloat64Struct) []error { - var errs []error - if !(obj.Field == 12.34) { - errs = append(errs, types.NewValidationError("Field must be equal to 12.34")) - } - return errs -} -func ValidatorEqInt16PointerStructValidate(obj *ValidatorEqInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt16StructValidate(obj *ValidatorEqInt16Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt32PointerStructValidate(obj *ValidatorEqInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt32StructValidate(obj *ValidatorEqInt32Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt64PointerStructValidate(obj *ValidatorEqInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt64StructValidate(obj *ValidatorEqInt64Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt8PointerStructValidate(obj *ValidatorEqInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqInt8StructValidate(obj *ValidatorEqInt8Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqIntPointerStructValidate(obj *ValidatorEqIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqIntStructValidate(obj *ValidatorEqIntStruct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqStringPointerStructValidate(obj *ValidatorEqStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == "abcde") { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidatorEqStringStructValidate(obj *ValidatorEqStringStruct) []error { - var errs []error - if !(obj.Field == "abcde") { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidatorEqUint16PointerStructValidate(obj *ValidatorEqUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint16StructValidate(obj *ValidatorEqUint16Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint32PointerStructValidate(obj *ValidatorEqUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint32StructValidate(obj *ValidatorEqUint32Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint64PointerStructValidate(obj *ValidatorEqUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint64StructValidate(obj *ValidatorEqUint64Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint8PointerStructValidate(obj *ValidatorEqUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUint8StructValidate(obj *ValidatorEqUint8Struct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUintPointerStructValidate(obj *ValidatorEqUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEqUintStructValidate(obj *ValidatorEqUintStruct) []error { - var errs []error - if !(obj.Field == 32) { - errs = append(errs, types.NewValidationError("Field must be equal to 32")) - } - return errs -} -func ValidatorEq_ignore_caseStringPointerStructValidate(obj *ValidatorEq_ignore_caseStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && strings.EqualFold(*obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidatorEq_ignore_caseStringStructValidate(obj *ValidatorEq_ignore_caseStringStruct) []error { - var errs []error - if !(strings.EqualFold(obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must be equal to 'abcde'")) - } - return errs -} -func ValidatorGtFloat32PointerStructValidate(obj *ValidatorGtFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidatorGtFloat32StructValidate(obj *ValidatorGtFloat32Struct) []error { - var errs []error - if !(obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidatorGtFloat64PointerStructValidate(obj *ValidatorGtFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidatorGtFloat64StructValidate(obj *ValidatorGtFloat64Struct) []error { - var errs []error - if !(obj.Field > 12.34) { - errs = append(errs, types.NewValidationError("Field must be > 12.34")) - } - return errs -} -func ValidatorGtInt16PointerStructValidate(obj *ValidatorGtInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt16StructValidate(obj *ValidatorGtInt16Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt32PointerStructValidate(obj *ValidatorGtInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt32StructValidate(obj *ValidatorGtInt32Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt64PointerStructValidate(obj *ValidatorGtInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt64StructValidate(obj *ValidatorGtInt64Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt8PointerStructValidate(obj *ValidatorGtInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtInt8StructValidate(obj *ValidatorGtInt8Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtIntPointerStructValidate(obj *ValidatorGtIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtIntStructValidate(obj *ValidatorGtIntStruct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint16PointerStructValidate(obj *ValidatorGtUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint16StructValidate(obj *ValidatorGtUint16Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint32PointerStructValidate(obj *ValidatorGtUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint32StructValidate(obj *ValidatorGtUint32Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint64PointerStructValidate(obj *ValidatorGtUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint64StructValidate(obj *ValidatorGtUint64Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint8PointerStructValidate(obj *ValidatorGtUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUint8StructValidate(obj *ValidatorGtUint8Struct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUintPointerStructValidate(obj *ValidatorGtUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGtUintStructValidate(obj *ValidatorGtUintStruct) []error { - var errs []error - if !(obj.Field > 32) { - errs = append(errs, types.NewValidationError("Field must be > 32")) - } - return errs -} -func ValidatorGteFloat32PointerStructValidate(obj *ValidatorGteFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidatorGteFloat32StructValidate(obj *ValidatorGteFloat32Struct) []error { - var errs []error - if !(obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidatorGteFloat64PointerStructValidate(obj *ValidatorGteFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidatorGteFloat64StructValidate(obj *ValidatorGteFloat64Struct) []error { - var errs []error - if !(obj.Field >= 12.34) { - errs = append(errs, types.NewValidationError("Field must be >= 12.34")) - } - return errs -} -func ValidatorGteInt16PointerStructValidate(obj *ValidatorGteInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt16StructValidate(obj *ValidatorGteInt16Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt32PointerStructValidate(obj *ValidatorGteInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt32StructValidate(obj *ValidatorGteInt32Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt64PointerStructValidate(obj *ValidatorGteInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt64StructValidate(obj *ValidatorGteInt64Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt8PointerStructValidate(obj *ValidatorGteInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteInt8StructValidate(obj *ValidatorGteInt8Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteIntPointerStructValidate(obj *ValidatorGteIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteIntStructValidate(obj *ValidatorGteIntStruct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint16PointerStructValidate(obj *ValidatorGteUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint16StructValidate(obj *ValidatorGteUint16Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint32PointerStructValidate(obj *ValidatorGteUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint32StructValidate(obj *ValidatorGteUint32Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint64PointerStructValidate(obj *ValidatorGteUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint64StructValidate(obj *ValidatorGteUint64Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint8PointerStructValidate(obj *ValidatorGteUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUint8StructValidate(obj *ValidatorGteUint8Struct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUintPointerStructValidate(obj *ValidatorGteUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorGteUintStructValidate(obj *ValidatorGteUintStruct) []error { - var errs []error - if !(obj.Field >= 32) { - errs = append(errs, types.NewValidationError("Field must be >= 32")) - } - return errs -} -func ValidatorInInt16PointerStructValidate(obj *ValidatorInInt16PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt16StructValidate(obj *ValidatorInInt16Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt32PointerStructValidate(obj *ValidatorInInt32PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt32StructValidate(obj *ValidatorInInt32Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt64PointerStructValidate(obj *ValidatorInInt64PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt64StructValidate(obj *ValidatorInInt64Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt8PointerStructValidate(obj *ValidatorInInt8PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInInt8StructValidate(obj *ValidatorInInt8Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInIntPointerStructValidate(obj *ValidatorInIntPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInIntStructValidate(obj *ValidatorInIntStruct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInStringPointerStructValidate(obj *ValidatorInStringPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == "ab") || (obj.Field != nil && *obj.Field == "cd") || (obj.Field != nil && *obj.Field == "ef")) { - errs = append(errs, types.NewValidationError("Field must be one of 'ab' 'cd' 'ef'")) - } - return errs -} -func ValidatorInStringStructValidate(obj *ValidatorInStringStruct) []error { - var errs []error - if !(obj.Field == "ab" || obj.Field == "cd" || obj.Field == "ef") { - errs = append(errs, types.NewValidationError("Field must be one of 'ab' 'cd' 'ef'")) - } - return errs -} -func ValidatorInUint16PointerStructValidate(obj *ValidatorInUint16PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint16StructValidate(obj *ValidatorInUint16Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint32PointerStructValidate(obj *ValidatorInUint32PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint32StructValidate(obj *ValidatorInUint32Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint64PointerStructValidate(obj *ValidatorInUint64PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint64StructValidate(obj *ValidatorInUint64Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint8PointerStructValidate(obj *ValidatorInUint8PointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUint8StructValidate(obj *ValidatorInUint8Struct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUintPointerStructValidate(obj *ValidatorInUintPointerStruct) []error { - var errs []error - if !((obj.Field != nil && *obj.Field == 12) || (obj.Field != nil && *obj.Field == 34) || (obj.Field != nil && *obj.Field == 56)) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorInUintStructValidate(obj *ValidatorInUintStruct) []error { - var errs []error - if !(obj.Field == 12 || obj.Field == 34 || obj.Field == 56) { - errs = append(errs, types.NewValidationError("Field must be one of '12' '34' '56'")) - } - return errs -} -func ValidatorLenBoolMapPointerStructValidate(obj *ValidatorLenBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenBoolMapStructValidate(obj *ValidatorLenBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenBoolSlicePointerStructValidate(obj *ValidatorLenBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenBoolSliceStructValidate(obj *ValidatorLenBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat32MapPointerStructValidate(obj *ValidatorLenFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat32MapStructValidate(obj *ValidatorLenFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat32SlicePointerStructValidate(obj *ValidatorLenFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat32SliceStructValidate(obj *ValidatorLenFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat64MapPointerStructValidate(obj *ValidatorLenFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat64MapStructValidate(obj *ValidatorLenFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat64SlicePointerStructValidate(obj *ValidatorLenFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenFloat64SliceStructValidate(obj *ValidatorLenFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt16MapPointerStructValidate(obj *ValidatorLenInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt16MapStructValidate(obj *ValidatorLenInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt16SlicePointerStructValidate(obj *ValidatorLenInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt16SliceStructValidate(obj *ValidatorLenInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt32MapPointerStructValidate(obj *ValidatorLenInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt32MapStructValidate(obj *ValidatorLenInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt32SlicePointerStructValidate(obj *ValidatorLenInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt32SliceStructValidate(obj *ValidatorLenInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt64MapPointerStructValidate(obj *ValidatorLenInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt64MapStructValidate(obj *ValidatorLenInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt64SlicePointerStructValidate(obj *ValidatorLenInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt64SliceStructValidate(obj *ValidatorLenInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt8MapPointerStructValidate(obj *ValidatorLenInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt8MapStructValidate(obj *ValidatorLenInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt8SlicePointerStructValidate(obj *ValidatorLenInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenInt8SliceStructValidate(obj *ValidatorLenInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenIntMapPointerStructValidate(obj *ValidatorLenIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenIntMapStructValidate(obj *ValidatorLenIntMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenIntSlicePointerStructValidate(obj *ValidatorLenIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenIntSliceStructValidate(obj *ValidatorLenIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenStringMapPointerStructValidate(obj *ValidatorLenStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenStringMapStructValidate(obj *ValidatorLenStringMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenStringPointerStructValidate(obj *ValidatorLenStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field length must be 2")) - } - return errs -} -func ValidatorLenStringSlicePointerStructValidate(obj *ValidatorLenStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenStringSliceStructValidate(obj *ValidatorLenStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenStringStructValidate(obj *ValidatorLenStringStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field length must be 2")) - } - return errs -} -func ValidatorLenUint16MapPointerStructValidate(obj *ValidatorLenUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint16MapStructValidate(obj *ValidatorLenUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint16SlicePointerStructValidate(obj *ValidatorLenUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint16SliceStructValidate(obj *ValidatorLenUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint32MapPointerStructValidate(obj *ValidatorLenUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint32MapStructValidate(obj *ValidatorLenUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint32SlicePointerStructValidate(obj *ValidatorLenUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint32SliceStructValidate(obj *ValidatorLenUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint64MapPointerStructValidate(obj *ValidatorLenUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint64MapStructValidate(obj *ValidatorLenUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint64SlicePointerStructValidate(obj *ValidatorLenUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint64SliceStructValidate(obj *ValidatorLenUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint8MapPointerStructValidate(obj *ValidatorLenUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint8MapStructValidate(obj *ValidatorLenUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint8SlicePointerStructValidate(obj *ValidatorLenUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUint8SliceStructValidate(obj *ValidatorLenUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUintMapPointerStructValidate(obj *ValidatorLenUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUintMapStructValidate(obj *ValidatorLenUintMapStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUintSlicePointerStructValidate(obj *ValidatorLenUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLenUintSliceStructValidate(obj *ValidatorLenUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) == 2) { - errs = append(errs, types.NewValidationError("Field must have exactly 2 elements")) - } - return errs -} -func ValidatorLtFloat32PointerStructValidate(obj *ValidatorLtFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidatorLtFloat32StructValidate(obj *ValidatorLtFloat32Struct) []error { - var errs []error - if !(obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidatorLtFloat64PointerStructValidate(obj *ValidatorLtFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidatorLtFloat64StructValidate(obj *ValidatorLtFloat64Struct) []error { - var errs []error - if !(obj.Field < 12.34) { - errs = append(errs, types.NewValidationError("Field must be < 12.34")) - } - return errs -} -func ValidatorLtInt16PointerStructValidate(obj *ValidatorLtInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt16StructValidate(obj *ValidatorLtInt16Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt32PointerStructValidate(obj *ValidatorLtInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt32StructValidate(obj *ValidatorLtInt32Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt64PointerStructValidate(obj *ValidatorLtInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt64StructValidate(obj *ValidatorLtInt64Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt8PointerStructValidate(obj *ValidatorLtInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtInt8StructValidate(obj *ValidatorLtInt8Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtIntPointerStructValidate(obj *ValidatorLtIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtIntStructValidate(obj *ValidatorLtIntStruct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint16PointerStructValidate(obj *ValidatorLtUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint16StructValidate(obj *ValidatorLtUint16Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint32PointerStructValidate(obj *ValidatorLtUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint32StructValidate(obj *ValidatorLtUint32Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint64PointerStructValidate(obj *ValidatorLtUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint64StructValidate(obj *ValidatorLtUint64Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint8PointerStructValidate(obj *ValidatorLtUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUint8StructValidate(obj *ValidatorLtUint8Struct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUintPointerStructValidate(obj *ValidatorLtUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLtUintStructValidate(obj *ValidatorLtUintStruct) []error { - var errs []error - if !(obj.Field < 32) { - errs = append(errs, types.NewValidationError("Field must be < 32")) - } - return errs -} -func ValidatorLteFloat32PointerStructValidate(obj *ValidatorLteFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidatorLteFloat32StructValidate(obj *ValidatorLteFloat32Struct) []error { - var errs []error - if !(obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidatorLteFloat64PointerStructValidate(obj *ValidatorLteFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidatorLteFloat64StructValidate(obj *ValidatorLteFloat64Struct) []error { - var errs []error - if !(obj.Field <= 12.34) { - errs = append(errs, types.NewValidationError("Field must be <= 12.34")) - } - return errs -} -func ValidatorLteInt16PointerStructValidate(obj *ValidatorLteInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt16StructValidate(obj *ValidatorLteInt16Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt32PointerStructValidate(obj *ValidatorLteInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt32StructValidate(obj *ValidatorLteInt32Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt64PointerStructValidate(obj *ValidatorLteInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt64StructValidate(obj *ValidatorLteInt64Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt8PointerStructValidate(obj *ValidatorLteInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteInt8StructValidate(obj *ValidatorLteInt8Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteIntPointerStructValidate(obj *ValidatorLteIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteIntStructValidate(obj *ValidatorLteIntStruct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint16PointerStructValidate(obj *ValidatorLteUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint16StructValidate(obj *ValidatorLteUint16Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint32PointerStructValidate(obj *ValidatorLteUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint32StructValidate(obj *ValidatorLteUint32Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint64PointerStructValidate(obj *ValidatorLteUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint64StructValidate(obj *ValidatorLteUint64Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint8PointerStructValidate(obj *ValidatorLteUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUint8StructValidate(obj *ValidatorLteUint8Struct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUintPointerStructValidate(obj *ValidatorLteUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorLteUintStructValidate(obj *ValidatorLteUintStruct) []error { - var errs []error - if !(obj.Field <= 32) { - errs = append(errs, types.NewValidationError("Field must be <= 32")) - } - return errs -} -func ValidatorMaxBoolMapPointerStructValidate(obj *ValidatorMaxBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 1) { - errs = append(errs, types.NewValidationError("Field must have at most 1 elements")) - } - return errs -} -func ValidatorMaxBoolMapStructValidate(obj *ValidatorMaxBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 1) { - errs = append(errs, types.NewValidationError("Field must have at most 1 elements")) - } - return errs -} -func ValidatorMaxBoolSlicePointerStructValidate(obj *ValidatorMaxBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxBoolSliceStructValidate(obj *ValidatorMaxBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat32MapPointerStructValidate(obj *ValidatorMaxFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat32MapStructValidate(obj *ValidatorMaxFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat32SlicePointerStructValidate(obj *ValidatorMaxFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat32SliceStructValidate(obj *ValidatorMaxFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat64MapPointerStructValidate(obj *ValidatorMaxFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat64MapStructValidate(obj *ValidatorMaxFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat64SlicePointerStructValidate(obj *ValidatorMaxFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxFloat64SliceStructValidate(obj *ValidatorMaxFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt16MapPointerStructValidate(obj *ValidatorMaxInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt16MapStructValidate(obj *ValidatorMaxInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt16SlicePointerStructValidate(obj *ValidatorMaxInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt16SliceStructValidate(obj *ValidatorMaxInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt32MapPointerStructValidate(obj *ValidatorMaxInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt32MapStructValidate(obj *ValidatorMaxInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt32SlicePointerStructValidate(obj *ValidatorMaxInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt32SliceStructValidate(obj *ValidatorMaxInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt64MapPointerStructValidate(obj *ValidatorMaxInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt64MapStructValidate(obj *ValidatorMaxInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt64SlicePointerStructValidate(obj *ValidatorMaxInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt64SliceStructValidate(obj *ValidatorMaxInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt8MapPointerStructValidate(obj *ValidatorMaxInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt8MapStructValidate(obj *ValidatorMaxInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt8SlicePointerStructValidate(obj *ValidatorMaxInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxInt8SliceStructValidate(obj *ValidatorMaxInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxIntMapPointerStructValidate(obj *ValidatorMaxIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxIntMapStructValidate(obj *ValidatorMaxIntMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxIntSlicePointerStructValidate(obj *ValidatorMaxIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxIntSliceStructValidate(obj *ValidatorMaxIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxStringMapPointerStructValidate(obj *ValidatorMaxStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxStringMapStructValidate(obj *ValidatorMaxStringMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxStringPointerStructValidate(obj *ValidatorMaxStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 3) { - errs = append(errs, types.NewValidationError("Field length must be <= 3")) - } - return errs -} -func ValidatorMaxStringSlicePointerStructValidate(obj *ValidatorMaxStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxStringSliceStructValidate(obj *ValidatorMaxStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxStringStructValidate(obj *ValidatorMaxStringStruct) []error { - var errs []error - if !(len(obj.Field) <= 3) { - errs = append(errs, types.NewValidationError("Field length must be <= 3")) - } - return errs -} -func ValidatorMaxUint16MapPointerStructValidate(obj *ValidatorMaxUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint16MapStructValidate(obj *ValidatorMaxUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint16SlicePointerStructValidate(obj *ValidatorMaxUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint16SliceStructValidate(obj *ValidatorMaxUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint32MapPointerStructValidate(obj *ValidatorMaxUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint32MapStructValidate(obj *ValidatorMaxUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint32SlicePointerStructValidate(obj *ValidatorMaxUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint32SliceStructValidate(obj *ValidatorMaxUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint64MapPointerStructValidate(obj *ValidatorMaxUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint64MapStructValidate(obj *ValidatorMaxUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint64SlicePointerStructValidate(obj *ValidatorMaxUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint64SliceStructValidate(obj *ValidatorMaxUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint8MapPointerStructValidate(obj *ValidatorMaxUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint8MapStructValidate(obj *ValidatorMaxUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint8SlicePointerStructValidate(obj *ValidatorMaxUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUint8SliceStructValidate(obj *ValidatorMaxUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUintMapPointerStructValidate(obj *ValidatorMaxUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUintMapStructValidate(obj *ValidatorMaxUintMapStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUintSlicePointerStructValidate(obj *ValidatorMaxUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMaxUintSliceStructValidate(obj *ValidatorMaxUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) <= 2) { - errs = append(errs, types.NewValidationError("Field must have at most 2 elements")) - } - return errs -} -func ValidatorMinBoolMapPointerStructValidate(obj *ValidatorMinBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinBoolMapStructValidate(obj *ValidatorMinBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinBoolSlicePointerStructValidate(obj *ValidatorMinBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinBoolSliceStructValidate(obj *ValidatorMinBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat32MapPointerStructValidate(obj *ValidatorMinFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat32MapStructValidate(obj *ValidatorMinFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat32SlicePointerStructValidate(obj *ValidatorMinFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat32SliceStructValidate(obj *ValidatorMinFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat64MapPointerStructValidate(obj *ValidatorMinFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat64MapStructValidate(obj *ValidatorMinFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat64SlicePointerStructValidate(obj *ValidatorMinFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinFloat64SliceStructValidate(obj *ValidatorMinFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt16MapPointerStructValidate(obj *ValidatorMinInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt16MapStructValidate(obj *ValidatorMinInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt16SlicePointerStructValidate(obj *ValidatorMinInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt16SliceStructValidate(obj *ValidatorMinInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt32MapPointerStructValidate(obj *ValidatorMinInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt32MapStructValidate(obj *ValidatorMinInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt32SlicePointerStructValidate(obj *ValidatorMinInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt32SliceStructValidate(obj *ValidatorMinInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt64MapPointerStructValidate(obj *ValidatorMinInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt64MapStructValidate(obj *ValidatorMinInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt64SlicePointerStructValidate(obj *ValidatorMinInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt64SliceStructValidate(obj *ValidatorMinInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt8MapPointerStructValidate(obj *ValidatorMinInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt8MapStructValidate(obj *ValidatorMinInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt8SlicePointerStructValidate(obj *ValidatorMinInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinInt8SliceStructValidate(obj *ValidatorMinInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinIntMapPointerStructValidate(obj *ValidatorMinIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinIntMapStructValidate(obj *ValidatorMinIntMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinIntSlicePointerStructValidate(obj *ValidatorMinIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinIntSliceStructValidate(obj *ValidatorMinIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinStringMapPointerStructValidate(obj *ValidatorMinStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinStringMapStructValidate(obj *ValidatorMinStringMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinStringPointerStructValidate(obj *ValidatorMinStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 5) { - errs = append(errs, types.NewValidationError("Field length must be >= 5")) - } - return errs -} -func ValidatorMinStringSlicePointerStructValidate(obj *ValidatorMinStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinStringSliceStructValidate(obj *ValidatorMinStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinStringStructValidate(obj *ValidatorMinStringStruct) []error { - var errs []error - if !(len(obj.Field) >= 5) { - errs = append(errs, types.NewValidationError("Field length must be >= 5")) - } - return errs -} -func ValidatorMinUint16MapPointerStructValidate(obj *ValidatorMinUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint16MapStructValidate(obj *ValidatorMinUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint16SlicePointerStructValidate(obj *ValidatorMinUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint16SliceStructValidate(obj *ValidatorMinUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint32MapPointerStructValidate(obj *ValidatorMinUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint32MapStructValidate(obj *ValidatorMinUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint32SlicePointerStructValidate(obj *ValidatorMinUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint32SliceStructValidate(obj *ValidatorMinUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint64MapPointerStructValidate(obj *ValidatorMinUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint64MapStructValidate(obj *ValidatorMinUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint64SlicePointerStructValidate(obj *ValidatorMinUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint64SliceStructValidate(obj *ValidatorMinUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint8MapPointerStructValidate(obj *ValidatorMinUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint8MapStructValidate(obj *ValidatorMinUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint8SlicePointerStructValidate(obj *ValidatorMinUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUint8SliceStructValidate(obj *ValidatorMinUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUintMapPointerStructValidate(obj *ValidatorMinUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUintMapStructValidate(obj *ValidatorMinUintMapStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUintSlicePointerStructValidate(obj *ValidatorMinUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorMinUintSliceStructValidate(obj *ValidatorMinUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) >= 2) { - errs = append(errs, types.NewValidationError("Field must have at least 2 elements")) - } - return errs -} -func ValidatorNeqBoolPointerStructValidate(obj *ValidatorNeqBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != true) { - errs = append(errs, types.NewValidationError("Field must not be equal to true")) - } - return errs -} -func ValidatorNeqBoolStructValidate(obj *ValidatorNeqBoolStruct) []error { - var errs []error - if !(obj.Field != true) { - errs = append(errs, types.NewValidationError("Field must not be equal to true")) - } - return errs -} -func ValidatorNeqFloat32PointerStructValidate(obj *ValidatorNeqFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidatorNeqFloat32StructValidate(obj *ValidatorNeqFloat32Struct) []error { - var errs []error - if !(obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidatorNeqFloat64PointerStructValidate(obj *ValidatorNeqFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidatorNeqFloat64StructValidate(obj *ValidatorNeqFloat64Struct) []error { - var errs []error - if !(obj.Field != 12.34) { - errs = append(errs, types.NewValidationError("Field must not be equal to 12.34")) - } - return errs -} -func ValidatorNeqInt16PointerStructValidate(obj *ValidatorNeqInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt16StructValidate(obj *ValidatorNeqInt16Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt32PointerStructValidate(obj *ValidatorNeqInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt32StructValidate(obj *ValidatorNeqInt32Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt64PointerStructValidate(obj *ValidatorNeqInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt64StructValidate(obj *ValidatorNeqInt64Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt8PointerStructValidate(obj *ValidatorNeqInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqInt8StructValidate(obj *ValidatorNeqInt8Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqIntPointerStructValidate(obj *ValidatorNeqIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqIntStructValidate(obj *ValidatorNeqIntStruct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqStringPointerStructValidate(obj *ValidatorNeqStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != "abcde") { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidatorNeqStringStructValidate(obj *ValidatorNeqStringStruct) []error { - var errs []error - if !(obj.Field != "abcde") { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidatorNeqUint16PointerStructValidate(obj *ValidatorNeqUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint16StructValidate(obj *ValidatorNeqUint16Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint32PointerStructValidate(obj *ValidatorNeqUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint32StructValidate(obj *ValidatorNeqUint32Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint64PointerStructValidate(obj *ValidatorNeqUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint64StructValidate(obj *ValidatorNeqUint64Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint8PointerStructValidate(obj *ValidatorNeqUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUint8StructValidate(obj *ValidatorNeqUint8Struct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUintPointerStructValidate(obj *ValidatorNeqUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeqUintStructValidate(obj *ValidatorNeqUintStruct) []error { - var errs []error - if !(obj.Field != 32) { - errs = append(errs, types.NewValidationError("Field must not be equal to 32")) - } - return errs -} -func ValidatorNeq_ignore_caseStringPointerStructValidate(obj *ValidatorNeq_ignore_caseStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && !strings.EqualFold(*obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidatorNeq_ignore_caseStringStructValidate(obj *ValidatorNeq_ignore_caseStringStruct) []error { - var errs []error - if !(!strings.EqualFold(obj.Field, "abcde")) { - errs = append(errs, types.NewValidationError("Field must not be equal to 'abcde'")) - } - return errs -} -func ValidatorRequiredBoolArrayPointerStructValidate(obj *ValidatorRequiredBoolArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredBoolMapPointerStructValidate(obj *ValidatorRequiredBoolMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredBoolMapStructValidate(obj *ValidatorRequiredBoolMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredBoolPointerStructValidate(obj *ValidatorRequiredBoolPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != false) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredBoolSlicePointerStructValidate(obj *ValidatorRequiredBoolSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredBoolSliceStructValidate(obj *ValidatorRequiredBoolSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredBoolStructValidate(obj *ValidatorRequiredBoolStruct) []error { - var errs []error - if !(obj.Field != false) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredFloat32ArrayPointerStructValidate(obj *ValidatorRequiredFloat32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat32MapPointerStructValidate(obj *ValidatorRequiredFloat32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat32MapStructValidate(obj *ValidatorRequiredFloat32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat32PointerStructValidate(obj *ValidatorRequiredFloat32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredFloat32SlicePointerStructValidate(obj *ValidatorRequiredFloat32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat32SliceStructValidate(obj *ValidatorRequiredFloat32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat32StructValidate(obj *ValidatorRequiredFloat32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredFloat64ArrayPointerStructValidate(obj *ValidatorRequiredFloat64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat64MapPointerStructValidate(obj *ValidatorRequiredFloat64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat64MapStructValidate(obj *ValidatorRequiredFloat64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat64PointerStructValidate(obj *ValidatorRequiredFloat64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredFloat64SlicePointerStructValidate(obj *ValidatorRequiredFloat64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat64SliceStructValidate(obj *ValidatorRequiredFloat64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredFloat64StructValidate(obj *ValidatorRequiredFloat64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt16ArrayPointerStructValidate(obj *ValidatorRequiredInt16ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt16MapPointerStructValidate(obj *ValidatorRequiredInt16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt16MapStructValidate(obj *ValidatorRequiredInt16MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt16PointerStructValidate(obj *ValidatorRequiredInt16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt16SlicePointerStructValidate(obj *ValidatorRequiredInt16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt16SliceStructValidate(obj *ValidatorRequiredInt16SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt16StructValidate(obj *ValidatorRequiredInt16Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt32ArrayPointerStructValidate(obj *ValidatorRequiredInt32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt32MapPointerStructValidate(obj *ValidatorRequiredInt32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt32MapStructValidate(obj *ValidatorRequiredInt32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt32PointerStructValidate(obj *ValidatorRequiredInt32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt32SlicePointerStructValidate(obj *ValidatorRequiredInt32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt32SliceStructValidate(obj *ValidatorRequiredInt32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt32StructValidate(obj *ValidatorRequiredInt32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt64ArrayPointerStructValidate(obj *ValidatorRequiredInt64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt64MapPointerStructValidate(obj *ValidatorRequiredInt64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt64MapStructValidate(obj *ValidatorRequiredInt64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt64PointerStructValidate(obj *ValidatorRequiredInt64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt64SlicePointerStructValidate(obj *ValidatorRequiredInt64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt64SliceStructValidate(obj *ValidatorRequiredInt64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt64StructValidate(obj *ValidatorRequiredInt64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt8ArrayPointerStructValidate(obj *ValidatorRequiredInt8ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt8MapPointerStructValidate(obj *ValidatorRequiredInt8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt8MapStructValidate(obj *ValidatorRequiredInt8MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt8PointerStructValidate(obj *ValidatorRequiredInt8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredInt8SlicePointerStructValidate(obj *ValidatorRequiredInt8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt8SliceStructValidate(obj *ValidatorRequiredInt8SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredInt8StructValidate(obj *ValidatorRequiredInt8Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredIntArrayPointerStructValidate(obj *ValidatorRequiredIntArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredIntMapPointerStructValidate(obj *ValidatorRequiredIntMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredIntMapStructValidate(obj *ValidatorRequiredIntMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredIntPointerStructValidate(obj *ValidatorRequiredIntPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredIntSlicePointerStructValidate(obj *ValidatorRequiredIntSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredIntSliceStructValidate(obj *ValidatorRequiredIntSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredIntStructValidate(obj *ValidatorRequiredIntStruct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredStringArrayPointerStructValidate(obj *ValidatorRequiredStringArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredStringMapPointerStructValidate(obj *ValidatorRequiredStringMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredStringMapStructValidate(obj *ValidatorRequiredStringMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredStringPointerStructValidate(obj *ValidatorRequiredStringPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != "") { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredStringSlicePointerStructValidate(obj *ValidatorRequiredStringSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredStringSliceStructValidate(obj *ValidatorRequiredStringSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredStringStructValidate(obj *ValidatorRequiredStringStruct) []error { - var errs []error - if !(obj.Field != "") { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint16ArrayPointerStructValidate(obj *ValidatorRequiredUint16ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint16MapPointerStructValidate(obj *ValidatorRequiredUint16MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint16MapStructValidate(obj *ValidatorRequiredUint16MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint16PointerStructValidate(obj *ValidatorRequiredUint16PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint16SlicePointerStructValidate(obj *ValidatorRequiredUint16SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint16SliceStructValidate(obj *ValidatorRequiredUint16SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint16StructValidate(obj *ValidatorRequiredUint16Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint32ArrayPointerStructValidate(obj *ValidatorRequiredUint32ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint32MapPointerStructValidate(obj *ValidatorRequiredUint32MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint32MapStructValidate(obj *ValidatorRequiredUint32MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint32PointerStructValidate(obj *ValidatorRequiredUint32PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint32SlicePointerStructValidate(obj *ValidatorRequiredUint32SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint32SliceStructValidate(obj *ValidatorRequiredUint32SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint32StructValidate(obj *ValidatorRequiredUint32Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint64ArrayPointerStructValidate(obj *ValidatorRequiredUint64ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint64MapPointerStructValidate(obj *ValidatorRequiredUint64MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint64MapStructValidate(obj *ValidatorRequiredUint64MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint64PointerStructValidate(obj *ValidatorRequiredUint64PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint64SlicePointerStructValidate(obj *ValidatorRequiredUint64SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint64SliceStructValidate(obj *ValidatorRequiredUint64SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint64StructValidate(obj *ValidatorRequiredUint64Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint8ArrayPointerStructValidate(obj *ValidatorRequiredUint8ArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint8MapPointerStructValidate(obj *ValidatorRequiredUint8MapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint8MapStructValidate(obj *ValidatorRequiredUint8MapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint8PointerStructValidate(obj *ValidatorRequiredUint8PointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUint8SlicePointerStructValidate(obj *ValidatorRequiredUint8SlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint8SliceStructValidate(obj *ValidatorRequiredUint8SliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUint8StructValidate(obj *ValidatorRequiredUint8Struct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUintArrayPointerStructValidate(obj *ValidatorRequiredUintArrayPointerStruct) []error { - var errs []error - if !(obj.Field != nil) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUintMapPointerStructValidate(obj *ValidatorRequiredUintMapPointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUintMapStructValidate(obj *ValidatorRequiredUintMapStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUintPointerStructValidate(obj *ValidatorRequiredUintPointerStruct) []error { - var errs []error - if !(obj.Field != nil && *obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} -func ValidatorRequiredUintSlicePointerStructValidate(obj *ValidatorRequiredUintSlicePointerStruct) []error { - var errs []error - if !(obj.Field != nil && len(*obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUintSliceStructValidate(obj *ValidatorRequiredUintSliceStruct) []error { - var errs []error - if !(len(obj.Field) != 0) { - errs = append(errs, types.NewValidationError("Field must not be empty")) - } - return errs -} -func ValidatorRequiredUintStructValidate(obj *ValidatorRequiredUintStruct) []error { - var errs []error - if !(obj.Field != 0) { - errs = append(errs, types.NewValidationError("Field is required")) - } - return errs -} diff --git a/types/color.go b/types/color.go index 25c1fe3..82c11b9 100644 --- a/types/color.go +++ b/types/color.go @@ -4,6 +4,7 @@ import "regexp" // Color patterns match go-playground/validator v10.28.0. // iscolor there is the alias hexcolor|rgb|rgba|hsl|hsla. +// The sample comparison lives in opencodeco/validgen-benchmarks/color. const ( hexColorRegexString = "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$" rgbRegexString = "^rgb\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*\\)$" diff --git a/types/color_test.go b/types/color_test.go index 84c345f..3a1cd96 100644 --- a/types/color_test.go +++ b/types/color_test.go @@ -1,75 +1,6 @@ package types -import ( - "testing" - - "github.com/go-playground/validator/v10" -) - -func TestColorMatchesValidator(t *testing.T) { - validate := validator.New() - samples := []string{ - "", - "#000", - "#000-", - "#fff", - "#FFFF", - "#aabbcc", - "#aabbccdd", - "#ab", - "#abcde", - "000000", - "rgb(0,0,0)", - "rgb(255,255,255)", - "rgb(255, 255, 255)", - "rgb(0%,0%,0%)", - "rgb(100%, 0%, 50%)", - "rgb(255%,255%,255%)", - "rgb(256,0,0)", - "rgb(0, 0, 0, 1)", - "RGB(0,0,0)", - "rgba(0,0,0,0)", - "rgba(0,0,0,1)", - "rgba(255,255,255,0.5)", - "rgba(0,0,0,0.0)", - "rgba(0%,0%,0%,1)", - "rgba(0,0,0,2)", - "hsl(0,0%,0%)", - "hsl(360,100%,50%)", - "hsl(0, 0%, 0%)", - "hsl(361,0%,0%)", - "hsl(120,50,50)", - "hsla(120,100%,50%,1)", - "hsla(120,100%,50%,0.5)", - "hsla(120,100%,50%,0.0)", - "red", - "blue", - "cmyk(0%,0%,0%,0%)", - "rgb(0,0,0%)", - } - checks := []struct { - tag string - fn func(string) bool - }{ - {tag: "hexcolor", fn: IsHexColor}, - {tag: "rgb", fn: IsRGB}, - {tag: "rgba", fn: IsRGBA}, - {tag: "hsl", fn: IsHSL}, - {tag: "hsla", fn: IsHSLA}, - {tag: "iscolor", fn: IsColor}, - } - - for _, sample := range samples { - for _, check := range checks { - err := validate.Var(sample, check.tag) - got := check.fn(sample) - want := err == nil - if got != want { - t.Errorf("%s %q = %v, validator accepted %v", check.tag, sample, got, want) - } - } - } -} +import "testing" func TestCommonExampleColors(t *testing.T) { if IsColor("#000-") {