package server import ( "embed" "io/fs" "net/http" ) //go:embed static/* var staticFiles embed.FS // staticHandler returns an http.Handler that serves embedded static files. func staticHandler() http.Handler { sub, _ := fs.Sub(staticFiles, "static") return http.FileServer(http.FS(sub)) }