Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetStaticFS ¶
SetStaticFS replaces the admin static filesystem.
Intended use: a thin-wrap host binary (e.g. services/ic-crm) embeds its own Nuxt-layer dist and calls SetStaticFS in main() before invoking the serve command. The replacement FS must contain a `dist/` directory whose contents mirror the embedded admin layout (serve.go passes `Root: "dist"` to the static middleware, which calls `fs.Sub(fsys, "dist")` — so `dist/index.html` must be readable under the FS root).
Must be called before the serve command constructs the HTTP stack. Once the static middleware is wired, it captures the FS at config time — later SetStaticFS calls cannot reach already-running handlers.
Panics if fsys is nil (bare-nil interface value, or a typed-nil pointer/map/slice/chan/func stored in the fs.FS interface). A nil FS would crash the static middleware with a less actionable error during request serving; failing fast at the setter call site (in main()) gives a clear stack trace at the point of the bug.
See docs/decisions/admin-index-override.md for the design rationale.
Types ¶
This section is empty.