// Package panel holds the built admin panel, embedded into the binary. package panel import ( "embed" "io/fs" ) //go:embed all:build var build embed.FS // FS returns the built panel, rooted at its index.html. ok is false when // the binary was compiled before `pnpm build`, and the panel is missing. func FS() (files fs.FS, ok bool) { sub, err := fs.Sub(build, "build/dist") if err != nil { return nil, false } if _, err := fs.Stat(sub, "index.html"); err != nil { return nil, false } return sub, true }