Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAssetHandler ¶
func NewAssetHandler(assets http.FileSystem, basePath string) http.Handler
NewAssetHandler creates a new AssetHandler with the given file system.
func RenderIndexTemplate ¶
RenderIndexTemplate renders the given index.html content as a Go template, injecting configuration (e.g. Sentry settings) from environment variables. It returns an error if the template cannot be parsed or executed.
Types ¶
type AssetHandler ¶
type AssetHandler struct {
// contains filtered or unexported fields
}
AssetHandler serves static files from the assets filesystem and handles SPA routing by serving index.html for non-asset routes.
func (*AssetHandler) ServeHTTP ¶
func (h *AssetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface.
Click to show internal directories.
Click to hide internal directories.