Initial project structure commit.
Static directory for public folders and business logic for the app within internal, split into domain specific folders to keep clear seperation of concerns.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user