Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleFiles ¶
func HandleFiles(w http.ResponseWriter, r *http.Request)
HandleFiles is handler for ... wait for it ... handling files. It just handles static files from your current directory.
Types ¶
type Options ¶
type Options struct { // Name gives the server binary a name. Name string // Version is the version of the server. Version string // Init is an optional function that fires after the server is listening // but before allowing incoming requests. Init func() // Flags is an optional function that allows for adding command line flags. Flags func() // FlagsParsed is an optional function that fires immediately after flags are parsed. FlagsParsed func() // Usage is an optional function that allows for altering the usage text. Usage func(usage string) string // Logger is a custom logger Logger *log.Logger // Dir is the directory static files. Default is "." Dir string // NoFlags disables automated flags and the the help menu NoFlags bool // Port bind HTTP port. default is 8000. Port int // LetsEncryptDomain enable TLS/HTTPS with Let's Encrypt for the given // domain name. LetsEncryptDomain string }
Options are server options
Click to show internal directories.
Click to hide internal directories.