modulepackage
0.0.0-20170811090902-cb637dbb2f05
Repository: https://github.com/akagi201/light.git
Documentation: pkg.go.dev
# README
light
Light is a minimal web framework in Go.
Features
- Use httprouter as http router
- Use alice to manage middlewares.
- Support Go1.7+
context
.
Install
go get github.com/Akagi201/light
Import
import "github.com/Akagi201/light"
# Packages
No description provided by the author
# Functions
Context returns the context from the given request, or a new context.Background if it doesn't exist.
New creates and initializes a new Handler using default settings and the given options.
NewHandler creates and initializes a new Handler with the given config.
Params returns the httprouter.Params from the request context.
SetContext updates the given context in the request if the request has been previously instrumented by httpmux.
WithHandleMethodNotAllowed returns a ConfigOption that uptates the Config.
WithMethodNotAllowed returns a ConfigOption that uptates the Config.
WithNotFound returns a ConfigOption that uptates the Config.
WithPanicHandler returns a ConfigOption that uptates the Config.
WithPrefix returns a ConfigOption that uptates the Config.
WithRedirectFixedPath returns a ConfigOption that uptates the Config.
WithRedirectTrailingSlash returns a ConfigOption that uptates the Config.
# Variables
DefaultConfig is the default Handler configuration used by New.
# Interfaces
ConfigOption is the interface for updating config options.
# Type aliases
ConfigOptionFunc is an adapter for config option functions.