Go http middleware for serving the favicon.
go get -u github.com/go-http-utils/favicon
API documentation can be found here: https://godoc.org/github.com/go-http-utils/favicon
import (
"github.com/go-http-utils/favicon"
)
mux := http.NewServeMux()
mux.HandleFunc("/", func(res http.ResponseWriter, req *http.Request) {
res.Write([]byte("Hello World"))
})
http.ListenAndServe(":8080", favicon.Handler(mux, "./public/favicon.ico"))