Home / Function/ TestRenderHTMLDebugFiles() — gin Function Reference

TestRenderHTMLDebugFiles() — gin Function Reference

Architecture documentation for the TestRenderHTMLDebugFiles() function in render_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  d3c9ee88_b347_1bae_6733_da1c5a66fcd1["TestRenderHTMLDebugFiles()"]
  067a4839_481a_7bd8_fc59_5c8c3313879c["render_test.go"]
  d3c9ee88_b347_1bae_6733_da1c5a66fcd1 -->|defined in| 067a4839_481a_7bd8_fc59_5c8c3313879c
  style d3c9ee88_b347_1bae_6733_da1c5a66fcd1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

render/render_test.go lines 522–541

func TestRenderHTMLDebugFiles(t *testing.T) {
	w := httptest.NewRecorder()
	htmlRender := HTMLDebug{
		Files:      []string{"../testdata/template/hello.tmpl"},
		Glob:       "",
		FileSystem: nil,
		Patterns:   nil,
		Delims:     Delims{Left: "{[{", Right: "}]}"},
		FuncMap:    nil,
	}
	instance := htmlRender.Instance("hello.tmpl", map[string]any{
		"name": "thinkerou",
	})

	err := instance.Render(w)

	require.NoError(t, err)
	assert.Equal(t, "<h1>Hello thinkerou</h1>", w.Body.String())
	assert.Equal(t, "text/html; charset=utf-8", w.Header().Get("Content-Type"))
}

Subdomains

Frequently Asked Questions

What does TestRenderHTMLDebugFiles() do?
TestRenderHTMLDebugFiles() is a function in the gin codebase, defined in render/render_test.go.
Where is TestRenderHTMLDebugFiles() defined?
TestRenderHTMLDebugFiles() is defined in render/render_test.go at line 522.

Analyze Your Own Codebase

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

Try Supermodel Free