Documentation
¶
Overview ¶
Package embedsupport wires up the optional embedded filesystems for conf, web/build, and skills. When the binary is built with -tags embed, the caller (main) passes the embedded fs.FS values here via Setup. At runtime, on-disk files always take priority; the embedded versions are used only when the corresponding directory is absent next to the executable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeEmbedded ¶
func ServeEmbedded(w http.ResponseWriter, r *http.Request, urlPath string)
ServeEmbedded serves a frontend asset from the embedded web/build FS. urlPath is the raw request URL path (e.g. "/", "/static/js/main.abc.js"). Must only be called when WebFS() != nil.
func Setup ¶
Setup must be called at the very start of main(), before any config values are read or HTTP requests are served.
Types ¶
This section is empty.