// Package staticassets embeds the compiled Tailwind CSS and htmx bundle // used by the web UI, so the nidus binary is self-contained and doesn't // need the web/ directory present at runtime. package staticassets import ( "embed" "io/fs" "net/http" ) //go:embed static var embedded embed.FS // FS returns an http.FileSystem serving the embedded static assets rooted // at "static/" (i.e. FS content is served without the "static/" prefix). func FS() http.FileSystem { sub, err := fs.Sub(embedded, "static") if err != nil { panic(err) // static dir is embedded at build time; this can't fail } return http.FS(sub) }