Files
goreportcard/handlers/assets.go
Stratos Neiros 6f2a40e392 Add favicon.ico and handler
Created a goreportcard favicon based on the original
https://golang.org/favicon.ico gopher favicon.
2016-02-09 00:44:34 +02:00

19 lines
439 B
Go

package handlers
import (
"log"
"net/http"
)
// AssetsHandler handles serving static files
func AssetsHandler(w http.ResponseWriter, r *http.Request) {
log.Println("Serving " + r.URL.Path[1:])
http.ServeFile(w, r, r.URL.Path[1:])
}
// FaviconHandler handles serving the favicon.ico
func FaviconHandler(w http.ResponseWriter, r *http.Request) {
log.Println("Serving " + r.URL.Path[1:])
http.ServeFile(w, r, "assets/favicon.ico")
}