Update help page
This commit is contained in:
10
web/help.go
10
web/help.go
@@ -1,7 +1,6 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
|
||||
@@ -23,14 +22,9 @@ func buildPage(w http.ResponseWriter, r *http.Request) {
|
||||
BarcodeOptions: barcodeOptions,
|
||||
}
|
||||
|
||||
tmpl, err := template.New("help").ParseFiles("templates/help.html") // Match template name and file name
|
||||
if err != nil {
|
||||
fmt.Println("Error templating page: ", err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
tmpl := template.Must(template.New("help.html").ParseFiles("templates/help.html"))
|
||||
|
||||
err = tmpl.Execute(w, data)
|
||||
err := tmpl.Execute(w, data)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user