Microsoft Windows™ :<
This commit is contained in:
parent
b3dbd23a8e
commit
1e61052ec1
7
main.go
7
main.go
@ -5,6 +5,7 @@ import (
|
||||
"html/template"
|
||||
"log"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
@ -26,15 +27,15 @@ func executeTemplate(w http.ResponseWriter, filepath string) {
|
||||
}
|
||||
|
||||
func homeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
path := "templates/home.gohtml"
|
||||
path := filepath.Join("templates", "home.gohtml")
|
||||
executeTemplate(w, path)
|
||||
}
|
||||
func contactHandler(w http.ResponseWriter, r *http.Request) {
|
||||
path := "templates/contact.gohtml"
|
||||
path := filepath.Join("templates", "contact.gohtml")
|
||||
executeTemplate(w, path)
|
||||
}
|
||||
func faqHandler(w http.ResponseWriter, r *http.Request) {
|
||||
path := "templates/faq.gohtml"
|
||||
path := filepath.Join("templates", "faq.gohtml")
|
||||
executeTemplate(w, path)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user