Add test code

This commit is contained in:
spsobole 2021-01-18 20:02:59 -07:00
parent 813df834ab
commit 75c29093b3
6 changed files with 23 additions and 0 deletions

View File

@ -16,6 +16,11 @@ type AuthManager interface {
DoAuth(w http.ResponseWriter, r *http.Request) (*AuthData, bool)
}
type Authenticator interface {
DoAuth(w http.ResponseWriter, r *http.Request) (*AuthData, bool)
}
//----------------------------------------------------------------------------------------------------------------------
func NewAuth(kind string) AuthManager {
switch kind {

View File

@ -0,0 +1 @@
skin-file

View File

@ -0,0 +1,4 @@
{{define "footer"}}
</body>
</html>
{{end}}

View File

@ -0,0 +1,7 @@
{{define "header"}}
<html lang="en">
<head>
<link rel="stylesheet" href="/static/{{ .Theme }}/css/normalize.css">
</head>
<body>
{{end}}

View File

@ -0,0 +1,3 @@
{{template "header" .}}
Test of things
{{template "footer" .}}

3
test/templates/test.html Normal file
View File

@ -0,0 +1,3 @@
{{template "header" .}}
User: {{ .User }}
{{template "footer" .}}