(b *testing.B)
| 632 | } |
| 633 | |
| 634 | func BenchmarkStructExceptFailure(b *testing.B) { |
| 635 | validate := New() |
| 636 | |
| 637 | type Test struct { |
| 638 | Name string `validate:"required"` |
| 639 | NickName string `validate:"required"` |
| 640 | } |
| 641 | |
| 642 | test := &Test{ |
| 643 | Name: "Joey Bloggs", |
| 644 | } |
| 645 | |
| 646 | b.ResetTimer() |
| 647 | for n := 0; n < b.N; n++ { |
| 648 | _ = validate.StructExcept(test, "Name") |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | func BenchmarkStructExceptFailureParallel(b *testing.B) { |
| 653 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…