// Package client holds the built web client, embedded into the binary. package client import ( "embed" "io/fs" ) //go:embed all:build var build embed.FS // FS returns the built client, rooted at its index.html. ok is false when // the binary was compiled before `pnpm build`, and the client 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 }