package main import ( "embed" "log" "net/http" ) //go:embed static var staticFiles embed.FS type Guestbook struct { Comments []string Count int } func main() { app := App{store: TxtStore("comments.txt")} http.HandleFunc("/", app.mainPageHandler) http.HandleFunc("/new", app.newCommentHandler) var staticFS = http.FS(staticFiles) http.Handle("/static/", http.FileServer(staticFS)) err := http.ListenAndServe(":80", nil) log.Fatal(err) }