small pixel drawing of a pufferfish vore

lil updates
Jes Olson j3s@c3f.net
Sat, 13 May 2023 22:36:55 -0700
commit

e3a70a5a4ecfb22e5d48f0b7bf1686e72583b91f

parent

01a8280c31c1653c999e148e0f1468c712836d27

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M main.gomain.go

@@ -8,10 +8,6 @@

func main() { s := New() mux := http.NewServeMux() - // since "/" is a wildcard, this anonymous function acts - // as a router for patterns that can't be registered at - // start time. e.g. /j3s or /j3s/feeds - // handles /, /<username>, and 404 mux.HandleFunc("/", s.rootHandler) mux.HandleFunc("/feeds", s.feedsHandler)
M site.gosite.go

@@ -41,6 +41,10 @@ }

return &s } +// rootHandler is our "wildcard handler", so in addition to +// serving /, it also acts as a router for a few arbitrary +// patterns that can't be registered at starttime +// this includes /<username> and 404 func (s *Site) rootHandler(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/" { s.indexHandler(w, r)