Skip to content

Commit f36f641

Browse files
committed
Embedded html file into bindata.go
1 parent f7e4bb0 commit f36f641

File tree

2 files changed

+250
-3
lines changed

2 files changed

+250
-3
lines changed

Diff for: bindata.go

+249
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: main.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ func main() {
1212
http.HandleFunc("/api/greeting", greeting)
1313
http.HandleFunc("/api/stop", stop)
1414
http.HandleFunc("/api/health", health)
15-
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
16-
http.ServeFile(w, r, "public/index.html")
17-
})
15+
http.Handle("/", http.FileServer(assetFS()))
1816
log.Fatal(http.ListenAndServe(":8080", nil))
1917
}
2018

0 commit comments

Comments
 (0)