TestLoadHTMLFilesUsingTLS() — gin Function Reference
Architecture documentation for the TestLoadHTMLFilesUsingTLS() function in gin_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 941171ab_750f_d5c5_a9c7_1e41b84d3039["TestLoadHTMLFilesUsingTLS()"] 936be97e_cadf_7cb7_50da_f99734bf8011["setupHTMLFiles()"] 941171ab_750f_d5c5_a9c7_1e41b84d3039 -->|calls| 936be97e_cadf_7cb7_50da_f99734bf8011 style 941171ab_750f_d5c5_a9c7_1e41b84d3039 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
gin_test.go lines 281–306
func TestLoadHTMLFilesUsingTLS(t *testing.T) {
ts := setupHTMLFiles(
t,
TestMode,
true,
func(router *Engine) {
router.LoadHTMLFiles("./testdata/template/hello.tmpl", "./testdata/template/raw.tmpl")
},
)
defer ts.Close()
// Use InsecureSkipVerify for avoiding `x509: certificate signed by unknown authority` error
tr := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
}
client := &http.Client{Transport: tr}
res, err := client.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
Calls
Source
Frequently Asked Questions
What does TestLoadHTMLFilesUsingTLS() do?
TestLoadHTMLFilesUsingTLS() is a function in the gin codebase.
What does TestLoadHTMLFilesUsingTLS() call?
TestLoadHTMLFilesUsingTLS() 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