Home / Function/ TestLoadHTMLFSTestMode() — gin Function Reference

TestLoadHTMLFSTestMode() — gin Function Reference

Architecture documentation for the TestLoadHTMLFSTestMode() function in gin_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  0edb8b91_6431_872d_b738_77f2b4e21eb4["TestLoadHTMLFSTestMode()"]
  936be97e_cadf_7cb7_50da_f99734bf8011["setupHTMLFiles()"]
  0edb8b91_6431_872d_b738_77f2b4e21eb4 -->|calls| 936be97e_cadf_7cb7_50da_f99734bf8011
  style 0edb8b91_6431_872d_b738_77f2b4e21eb4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 330–348

func TestLoadHTMLFSTestMode(t *testing.T) {
	ts := setupHTMLFiles(
		t,
		TestMode,
		false,
		func(router *Engine) {
			router.LoadHTMLFS(tmplFS, "hello.tmpl", "raw.tmpl")
		},
	)
	defer ts.Close()

	res, err := http.Get(ts.URL + "/test")
	if err != nil {
		t.Error(err)
	}

	resp, _ := io.ReadAll(res.Body)
	assert.Equal(t, "<h1>Hello world</h1>", string(resp))
}

Domain

Subdomains

Frequently Asked Questions

What does TestLoadHTMLFSTestMode() do?
TestLoadHTMLFSTestMode() is a function in the gin codebase.
What does TestLoadHTMLFSTestMode() call?
TestLoadHTMLFSTestMode() calls 1 function(s): setupHTMLFiles.

Analyze Your Own Codebase

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

Try Supermodel Free