package web import ( "embed" "io/fs" "net/http" ) //go:embed templates templates/partials static var uiFS embed.FS // GetStaticFileSystem returns an http.FileSystem for embedded UI assets. func GetStaticFileSystem() http.FileSystem { subFS, err := fs.Sub(uiFS, "static") if err != nil { panic(err) } return http.FS(subFS) } // StaticHandler serves /assets/* files from embedded static assets. func StaticHandler() http.Handler { return http.StripPrefix("/assets/", http.FileServer(GetStaticFileSystem())) } // GetTemplateFS returns the embedded template filesystem. func GetTemplateFS() fs.FS { return uiFS }