MCPcopy
hub / github.com/gin-gonic/gin / BenchmarkMapFormName

Function BenchmarkMapFormName

binding/form_mapping_benchmark_test.go:55–67  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

53}
54
55func BenchmarkMapFormName(b *testing.B) {
56 var s structName
57 for b.Loop() {
58 err := mapForm(&s, form)
59 if err != nil {
60 b.Fatalf("Error on a form mapping")
61 }
62 }
63 b.StopTimer()
64
65 t := b
66 assert.Equal(t, "mike", s.Name)
67}

Callers

nothing calls this directly

Calls 1

mapFormFunction · 0.85

Tested by

no test coverage detected