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

Dependency Diagram

graph TD
  8802d532_8293_cda1_310c_932d9556a6d0["BenchmarkMapFormFull()"]
  652e7bf5_3c89_5be4_42af_9fdbc680bb55["form_mapping_benchmark_test.go"]
  8802d532_8293_cda1_310c_932d9556a6d0 -->|defined in| 652e7bf5_3c89_5be4_42af_9fdbc680bb55
  style 8802d532_8293_cda1_310c_932d9556a6d0 fill:#6366f1,stroke:#818cf8,color:#fff

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)
}

Subdomains

Frequently Asked Questions

What does BenchmarkMapFormFull() do?
BenchmarkMapFormFull() is a function in the gin codebase, defined in binding/form_mapping_benchmark_test.go.
Where is BenchmarkMapFormFull() defined?
BenchmarkMapFormFull() is defined in binding/form_mapping_benchmark_test.go at line 32.

Analyze Your Own Codebase

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

Try Supermodel Free