package main import ( "embed" "io/fs" "net/http" ) //go:embed public/* var public embed.FS func must[T any](t T, err error) T { if err != nil { panic(err) } return t } func main() { http.Handle("/", http.FileServerFS(must(fs.Sub(public, "public")))) http.ListenAndServe(":http", nil) }