(b *testing.B)
| 518 | } |
| 519 | |
| 520 | func BenchmarkStructPartialSuccess(b *testing.B) { |
| 521 | validate := New() |
| 522 | |
| 523 | type Test struct { |
| 524 | Name string `validate:"required"` |
| 525 | NickName string `validate:"required"` |
| 526 | } |
| 527 | |
| 528 | test := &Test{ |
| 529 | Name: "Joey Bloggs", |
| 530 | } |
| 531 | |
| 532 | b.ResetTimer() |
| 533 | for n := 0; n < b.N; n++ { |
| 534 | _ = validate.StructPartial(test, "Name") |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | func BenchmarkStructPartialSuccessParallel(b *testing.B) { |
| 539 | validate := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…