Documentation
¶
Overview ¶
Package static provides a handler for serving static assets from an in-memory map.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Assets map[string]string
// Index is the name of an entry in Assets that should be used if the request
// path is empty (equivalent to requesting "/"). This is analogous to index
// documents commonly used in webservers. If Index is empty, it will be
// ignored.
Index string
// Default is the name of an entry in Assets that should be used if the
// the requested path does not exist in Assets. This is useful for
// delivering a common document (usually a frontend application script) that
// handles URL-based state on the client side. If Default is empty, it will be
// ignored.
Default string
}
Click to show internal directories.
Click to hide internal directories.