Documentation
¶
Overview ¶
Package static provides handlers for serving static assets from an `fs.FS` instance and for appending references to those assets to HTML output.
Index ¶
- func AppendStaticAssetHandlers(mux *http.ServeMux, static_fs fs.FS) error
- func AppendStaticAssetHandlersWithPrefix(mux *http.ServeMux, static_fs fs.FS, prefix string) error
- func StaticAssetsHandler(static_fs fs.FS) (http.Handler, error)
- func StaticAssetsHandlerWithPrefix(static_fs fs.FS, prefix string) (http.Handler, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStaticAssetHandlers ¶
AppendStaticAssetHandlers registers a handler on 'mux' for each file in 'static_fs'.
func AppendStaticAssetHandlersWithPrefix ¶
AppendStaticAssetHandlersWithPrefix registers a handler on 'mux' for each file in 'static_fs', with 'prefix' prepended to the path of each file.
func StaticAssetsHandler ¶
StaticAssetsHandler returns an `http.Handler` that serves the files in 'static_fs'.
Types ¶
This section is empty.