diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-09 16:19:55 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-09 16:19:55 +0100 |
commit | 3fe43f85aefedc6223aee45171df483e2f57c381 (patch) | |
tree | 19e4fbb9e7708db40f238218d9bc961fcca3a1c9 /main.go | |
parent | e72034c430eb8e78a87d4b1d312e4a9c11f3df14 (diff) | |
download | guichet-3fe43f85aefedc6223aee45171df483e2f57c381.tar.gz guichet-3fe43f85aefedc6223aee45171df483e2f57c381.zip |
Integrate Bootstrap CSS
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,6 @@ import ( "os" "strings" "flag" - "fmt" "log" "net/http" "io/ioutil" @@ -156,6 +155,7 @@ type LoginFormData struct { var ( templateLogin = template.Must(template.ParseFiles("templates/layout.html", "templates/login.html")) + templateHome = template.Must(template.ParseFiles("templates/layout.html", "templates/home.html")) ) // Page handlers ---- @@ -166,7 +166,7 @@ func handleHome(w http.ResponseWriter, r *http.Request) { return } - fmt.Fprintf(w, "Welcome, %s!", login.Username) + templateHome.Execute(w, login) } func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo { |