(b *testing.B)
| 556 | } |
| 557 | |
| 558 | func BenchmarkStructPartialFailure(b *testing.B) { |
| 559 | validate := New() |
| 560 | |
| 561 | type Test struct { |
| 562 | Name string `validate:"required"` |
| 563 | NickName string `validate:"required"` |
| 564 | } |
| 565 | |
| 566 | test := &Test{ |
| 567 | Name: "Joey Bloggs", |
| 568 | } |
| 569 | |
| 570 | b.ResetTimer() |
| 571 | for n := 0; n < b.N; n++ { |
| 572 | _ = validate.StructPartial(test, "NickName") |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | func BenchmarkStructPartialFailureParallel(b *testing.B) { |
| 577 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…