Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Default page to load (upon a miss) DefaultPage = "index.html" // DefaultPageContentType is the content-type of the DefaultPage DefaultPageContentType = "text/html; charset=utf-8" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BindataAssets ¶
type BindataAssets struct { }
BindataAssets serves embedded ui assets and also serves its index.html by default in order to support single-page react-apps with its own router.
func (*BindataAssets) Handler ¶
func (b *BindataAssets) Handler() http.Handler
Handler returns HTTP handler that serves embedded data
func (*BindataAssets) ServeHTTP ¶
func (b *BindataAssets) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP wraps http.FileServer by returning a default asset if the asset doesn't exist. This supports single-page react-apps with its own built-in router. Additionally, we override the content-type if the Default file is used.
Click to show internal directories.
Click to hide internal directories.