Home / Function/ TestRenderHTMLDebugGlob() — gin Function Reference

TestRenderHTMLDebugGlob() — gin Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

render/render_test.go lines 543–562

func TestRenderHTMLDebugGlob(t *testing.T) {
	w := httptest.NewRecorder()
	htmlRender := HTMLDebug{
		Files:      nil,
		Glob:       "../testdata/template/hello*",
		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 TestRenderHTMLDebugGlob() do?
TestRenderHTMLDebugGlob() is a function in the gin codebase, defined in render/render_test.go.
Where is TestRenderHTMLDebugGlob() defined?
TestRenderHTMLDebugGlob() is defined in render/render_test.go at line 543.

Analyze Your Own Codebase

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

Try Supermodel Free