Enabling Go Modules and refactoring our code to use packages
This commit is contained in:
17
pkg/handlers/handlers.go
Normal file
17
pkg/handlers/handlers.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"gitea.sitodosi.com/betology/curso/pkg/render"
|
||||
)
|
||||
|
||||
// Home is the home page handler
|
||||
func Home(w http.ResponseWriter, r *http.Request) {
|
||||
render.RenderTemplate(w, "home.page.tmpl")
|
||||
}
|
||||
|
||||
// About is the about page handler
|
||||
func About(w http.ResponseWriter, r *http.Request) {
|
||||
render.RenderTemplate(w, "about.page.tmpl")
|
||||
}
|
||||
Reference in New Issue
Block a user