MCPcopy
hub / github.com/gin-gonic/gin / debugPrintWARNINGSetHTMLTemplate

Function debugPrintWARNINGSetHTMLTemplate

debug.go:100–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func debugPrintWARNINGSetHTMLTemplate() {
101 debugPrint(`[WARNING] Since SetHTMLTemplate() is NOT thread-safe. It should only be called
102at initialization. ie. before any route is registered or the router is listening in a socket:
103
104 router := gin.Default()
105 router.SetHTMLTemplate(template) // << good place
106
107`)
108}
109
110func debugPrintError(err error) {
111 if err != nil && IsDebugging() {

Callers 2

SetHTMLTemplateMethod · 0.85

Calls 1

debugPrintFunction · 0.85

Tested by 1