diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..4b642c4 Binary files /dev/null and b/favicon.ico differ diff --git a/main.go b/main.go index 1fb4cfa..53eb45a 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,8 @@ package main import ( "crypto/sha256" + "embed" + _ "embed" "errors" "flag" "fmt" @@ -26,6 +28,9 @@ const PubKey = "RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U" const ZigMirrorRelease = "https://ziglang.org/download" const ZigMirrorBuilds = "https://ziglang.org/builds" +//go:embed favicon.ico +var favicon embed.FS + type zigVersion struct { maj uint32 min uint32 @@ -77,6 +82,7 @@ func main() { reg := registry.Init() mux := http.NewServeMux() + mux.Handle("GET /favicon.ico", http.FileServer(http.FS(favicon))) mux.HandleFunc("GET /{filename}", func(w http.ResponseWriter, r *http.Request) { fileName := r.PathValue("filename") sugar := logger.Sugar().With("filename", fileName)