MCPcopy Create free account
hub / github.com/daodst/chat / serveTemplate

Function serveTemplate

clientapi/routing/auth_fallback.go:94–99  ·  view source on GitHub ↗

serveTemplate fills template data and serves it using http.ResponseWriter

(w http.ResponseWriter, templateHTML string, data map[string]string)

Source from the content-addressed store, hash-verified

92
93// serveTemplate fills template data and serves it using http.ResponseWriter
94func serveTemplate(w http.ResponseWriter, templateHTML string, data map[string]string) {
95 t := template.Must(template.New("response").Parse(templateHTML))
96 if err := t.Execute(w, data); err != nil {
97 panic(err)
98 }
99}
100
101// AuthFallback implements GET and POST /auth/{authType}/fallback/web?session={sessionID}
102func AuthFallback(

Callers 1

AuthFallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected