handlers and render funcs take apart
This commit is contained in:
15
handlers.go
Normal file
15
handlers.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Home is the home page handler
|
||||
func Home(w http.ResponseWriter, r *http.Request) {
|
||||
renderTemplate(w, "home.page.tmpl")
|
||||
}
|
||||
|
||||
// About is the about page handler
|
||||
func About(w http.ResponseWriter, r *http.Request) {
|
||||
renderTemplate(w, "about.page.tmpl")
|
||||
}
|
||||
Reference in New Issue
Block a user