a8862721cd
Static directory for public folders and business logic for the app within internal, split into domain specific folders to keep clear seperation of concerns.
15 lines
245 B
Go
15 lines
245 B
Go
package web
|
|
|
|
import "net/http"
|
|
|
|
type HomeData struct {
|
|
Title string
|
|
}
|
|
|
|
func (s *Server) handleHome() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
data := HomeData{Title: "NFeeder"}
|
|
view(w, r, "home", data)
|
|
}
|
|
}
|