package server import "net/http" const faviconSVG = ` Rud? ` func (s *Server) serveFavicon(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodGet && r.Method != http.MethodHead { w.Header().Set("Allow", "GET, HEAD") http.Error(w, "method not allowed", http.StatusMethodNotAllowed) return } w.Header().Set("Content-Type", "image/svg+xml; charset=utf-8") w.Header().Set("Cache-Control", "public, max-age=86400") if r.Method == http.MethodHead { return } _, _ = w.Write([]byte(faviconSVG)) }