package server import ( "html/template" "net/http" ) type htmlTemplate = template.Template func mustParseLoginTemplate() *htmlTemplate { return template.Must(template.New("login").Parse(loginPageHTML)) } func (s *Server) renderLogin(w http.ResponseWriter, errMsg string) { w.Header().Set("Content-Type", "text/html; charset=utf-8") _ = s.cookies.Execute(w, map[string]string{"Error": errMsg}) } const loginPageHTML = ` Web VNC

🖥️ Web VNC

Enter the access password

{{.Error}}
`