package httpserver import ( "net/http" "github.com/rs/zerolog/log" ) func (s *server) handleIndex() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { content, err := s.staticFiles.ReadFile("web/index.html") if err != nil { log.Fatal().Err(err).Send() } w.Write(content) } }