(b *testing.B)
| 612 | } |
| 613 | |
| 614 | func BenchmarkStructExceptSuccessParallel(b *testing.B) { |
| 615 | validate := New() |
| 616 | |
| 617 | type Test struct { |
| 618 | Name string `validate:"required"` |
| 619 | NickName string `validate:"required"` |
| 620 | } |
| 621 | |
| 622 | test := &Test{ |
| 623 | Name: "Joey Bloggs", |
| 624 | } |
| 625 | |
| 626 | b.ResetTimer() |
| 627 | b.RunParallel(func(pb *testing.PB) { |
| 628 | for pb.Next() { |
| 629 | _ = validate.StructExcept(test, "NickName") |
| 630 | } |
| 631 | }) |
| 632 | } |
| 633 | |
| 634 | func BenchmarkStructExceptFailure(b *testing.B) { |
| 635 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…