Home / Function/ BenchmarkMapFormFull() — gin Function Reference

BenchmarkMapFormFull() — gin Function Reference

Architecture documentation for the BenchmarkMapFormFull() function in form_mapping_benchmark_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_benchmark_test.go lines 32–49

func BenchmarkMapFormFull(b *testing.B) {
	var s structFull
	for b.Loop() {
		err := mapForm(&s, form)
		if err != nil {
			b.Fatalf("Error on a form mapping")
		}
	}
	b.StopTimer()

	t := b
	assert.Equal(t, "mike", s.Name)
	assert.Equal(t, 25, s.Age)
	assert.Equal(t, []string{"anna", "nicole"}, s.Friends)
	assert.Equal(t, "12345678", s.ID.Number)
	assert.Equal(t, time.Date(2018, 1, 20, 0, 0, 0, 0, time.UTC), s.ID.DateOfIssue)
	assert.Nil(t, s.Nationality)
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free