Documentation ¶
Overview ¶
Package core provides a pure handlers (or middlewares) stack so you can perform actions downstream, then filter and manipulate the response upstream.
The handlers stack ¶
A handler is a function that receives a Context (which contains the response writer and the request). It can be registered with Use and has the possibility to break the stream or to continue with the next handler of the stack.
Example of a logger, followed by a security headers setter, followed by a response writer:
// Log core.Use(func(c *core.Context) { // Before the response. start := time.Now() // Execute the next handler in the stack. c.Next() // After the response. log.Printf(" %s %s %s", c.Request.Method, c.Request.URL, time.Since(start)) }) // Secure core.Use(func(c *core.Context) { c.ResponseWriter.Header().Set("X-Frame-Options", "SAMEORIGIN") c.ResponseWriter.Header().Set("X-Content-Type-Options", "nosniff") c.ResponseWriter.Header().Set("X-XSS-Protection", "1; mode=block") // Execute the next handler in the stack. c.Next() }) // Response core.Use(func(c *core.Context) { fmt.Fprint(c.ResponseWriter, "Hello, World!") }) // Run server core.Run()
A clearer visualization of this serving flow:
request open |— log start |——— secure start |————— response write |——— secure end |— log end request close
When using Run, your app is reachable at http://localhost:8080 by default.
If you need more flexibility, you can make a new handlers stack, which is fully compatible with the net/http.Handler interface:
hs := core.NewHandlersStack() hs.Use(func(c *core.Context) { fmt.Fprint(c.ResponseWriter, "Hello, World!") }) http.ListenAndServe(":8080", hs)
Flags ¶
These flags are predefined:
-address The address to listen and serving on. Value is saved in Address. -production Run the server in production environment. Some third-party handlers may have different behaviors depending on the environment. Value is saved in Production.
It's up to you to call
flag.Parse()
in your main function if you want to use them.
Panic recovering ¶
When using Run, your server always recovers from panics, logs the error with stack, and sends a 500 Internal Server Error. If you want to use a custom handler on panic, give one to HandlePanic.
Handlers and helpers ¶
No handlers or helpers are bundled in the core: it does one thing and does it well. That's why you have to import all and only the handlers or helpers you need:
compress Clever response compressing github.com/HiLittleCat/compress cors Cross-Origin Resource Sharing support https://godoc.org/github.com/HiLittleCat/cors i18n Simple internationalization https://godoc.org/github.com/HiLittleCat/i18n log Requests logging https://godoc.org/github.com/HiLittleCat/log response Readable response helper https://godoc.org/github.com/HiLittleCat/response secure Quick security wins https://godoc.org/github.com/HiLittleCat/secure static Simple assets serving https://godoc.org/github.com/HiLittleCat/static
Index ¶
- Constants
- Variables
- func BeforeRun(f func())
- func HandlePanic(h RouterHandler)
- func Run()
- func SessionInit(expire time.Duration, pool *conn.RedisPool, cookie http.Cookie)
- func SetLog(logPath string, logFileName string)
- func Use(h RouterHandler)
- type BusinessError
- type Context
- func (ctx *Context) DeleteSession() error
- func (ctx *Context) Fail(err error)
- func (ctx *Context) FreshSession(key string) error
- func (ctx *Context) GetBodyJSON()
- func (ctx *Context) GetSession() IStore
- func (ctx *Context) GetSid() string
- func (ctx *Context) Next()
- func (ctx *Context) Ok(data interface{})
- func (ctx *Context) Param(key string) string
- func (ctx *Context) Recover()
- func (ctx *Context) Redirect(url string, code int)
- func (ctx *Context) ResFree(data interface{})
- func (ctx *Context) ResStatus(code int) (int, error)
- func (ctx *Context) SetSession(key string, values map[string]string) error
- func (ctx *Context) Written() bool
- func (ctx *Context) ZipHandler(fileName string, file []byte)
- type Controller
- func (c *Controller) Err(errno int, message string) error
- func (c *Controller) GetBodyJSON(ctx *Context) map[string]interface{}
- func (c *Controller) GetEmail(fieldName string, p interface{}) string
- func (c *Controller) Int64Range(fieldName string, p interface{}, n int64, m int64) int64
- func (c *Controller) IntMax(fieldName string, p interface{}, m int) int
- func (c *Controller) IntMin(fieldName string, p interface{}, n int) int
- func (c *Controller) IntRange(fieldName string, p interface{}, n int, m int) int
- func (c *Controller) IntRangeZoom(fieldName string, p interface{}, n int, m int, zoom int) int
- func (c *Controller) RegisterRouter()
- func (c *Controller) StrIn(fieldName string, p interface{}, l ...string) string
- func (c *Controller) StrLenIn(fieldName string, p interface{}, l ...int) string
- func (c *Controller) StrLenRange(fieldName string, p interface{}, n int, m int) string
- func (c *Controller) StrLength(fieldName string, p interface{}, n int) string
- type DBError
- type Domain
- type Email
- type Engine
- type FilePath
- type H
- type HandlersStack
- type IController
- type ICoreError
- type IModel
- type IPAddr
- type IProvider
- type IRouter
- type IRoutes
- type IService
- type IStore
- type Length
- type MacAddr
- type Match
- type Max
- type MaxSize
- type Min
- type MinSize
- type Model
- type NotFoundError
- type Param
- type Params
- type PureText
- type Range
- type Required
- type ResFormat
- type RouterGroup
- func (group *RouterGroup) Any(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) BasePath() string
- func (group *RouterGroup) DELETE(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) GET(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) Group(relativePath string, handlers ...RouterHandler) *RouterGroup
- func (group *RouterGroup) HEAD(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) OPTIONS(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) PATCH(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) POST(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) PUT(relativePath string, handlers ...RouterHandler) IRoutes
- func (group *RouterGroup) Use(middleware ...RouterHandler) IRoutes
- type RouterHandler
- type RouterHandlerChain
- type ServerError
- type Service
- type URL
- type Validation
- func (v *Validation) Domain(str string) bool
- func (v *Validation) Email(str string) bool
- func (v *Validation) FilePath(str string, m int) bool
- func (v *Validation) IPAddr(str string, cktype ...int) bool
- func (v *Validation) Length(obj interface{}, n int) bool
- func (v *Validation) MacAddr(str string) bool
- func (v *Validation) Match(str string, regex *regexp.Regexp) bool
- func (v *Validation) Max(n int, max int) bool
- func (v *Validation) MaxFloat(n float64, max float64) bool
- func (v *Validation) MaxSize(obj interface{}, max int) bool
- func (v *Validation) Min(n int, min int) bool
- func (v *Validation) MinFloat(n float64, min float64) bool
- func (v *Validation) MinSize(obj interface{}, min int) bool
- func (v *Validation) PureText(str string, m int) bool
- func (v *Validation) Range(n, min, max int) bool
- func (v *Validation) Range64(n, min, max int64) bool
- func (v *Validation) RangeFloat(n, min, max float64) bool
- func (v *Validation) Required(obj interface{}) bool
- func (v *Validation) URL(str string) bool
- type ValidationError
- type Validator
Constants ¶
const ( None = 0 IPAny = 1 IPv4 = 32 // IPv4 (32 chars) IPv6 = 39 // IPv6(39 chars) IPv4MappedIPv6 = 45 // IP4-mapped IPv6 (45 chars) , Ex) ::FFFF:129.144.52.38 IPv4CIDR = IPv4 + 3 IPv6CIDR = IPv6 + 3 IPv4MappedIPv6CIDR = IPv4MappedIPv6 + 3 )
const ( NORMAL = 0 STRICT = 4 )
NORMAL BenchmarkRegex-8 2000000000 0.24 ns/op STRICT BenchmarkLoop-8 2000000000 0.01 ns/op
const ( ONLY_FILENAME = 0 ALLOW_RELATIVE_PATH = 1 )
Variables ¶
var ( // OpenCommandLine Open command line params. OpenCommandLine bool // Production allows handlers know whether the server is running in a production environment. Production bool // Address is the TCP network address on which the server is listening and serving. Default is ":8080". Address = ":8080" // Timeout is the duration to allow outstanding requests to survive // before forcefully terminating them. Timeout = 30 * time.Second // ListenLimit Limit the number of outstanding requests ListenLimit = 5000 // ReadTimeout Maximum duration for reading the full request (including body); ns|µs|ms|s|m|h ReadTimeout = 5 * time.Second // WriteTimeout Maximum duration for writing the full response (including body); ns|µs|ms|s|m|h WriteTimeout = 10 * time.Second // IdleTimeout is the maximum amount of time to wait for the // next request when keep-alives are enabled. If IdleTimeout // is zero, the value of ReadTimeout is used. If both are // zero, ReadHeaderTimeout is used. IdleTimeout time.Duration // MultipartMaxmemoryMb Maximum size of memory that can be used when receiving uploaded files MultipartMaxmemoryMb int // MaxHeaderBytes Max HTTP Herder size, default is 0, no limit MaxHeaderBytes = 1 << 20 )
var Log *logrus.Logger
Log core框架日志
var Routers = create()
Routers create router instance
Functions ¶
func BeforeRun ¶
func BeforeRun(f func())
BeforeRun adds a function that will be triggered just before running the server.
func HandlePanic ¶
func HandlePanic(h RouterHandler)
HandlePanic sets the panic handler of the default handlers stack.
Context.Data["panic"] contains the panic error.
func SessionInit ¶
SessionInit 初始化并加载session中间件
Types ¶
type BusinessError ¶
type BusinessError struct {
// contains filtered or unexported fields
}
BusinessError http.StatusInternalServerError
func (*BusinessError) GetHTTPCode ¶
func (e *BusinessError) GetHTTPCode() int
GetHTTPCode get error HTTPCode
func (*BusinessError) New ¶
func (e *BusinessError) New(errno int, message string) *BusinessError
New http.StatusInternalServerError
type Context ¶
type Context struct { ResponseWriter http.ResponseWriter Request *http.Request Params Params // Path Value Data map[string]interface{} // Custom Data BodyJSON map[string]interface{} // body json data // contains filtered or unexported fields }
Context contains all the data needed during the serving flow, including the standard http.ResponseWriter and *http.Request.
The Data field can be used to pass all kind of data through the handlers stack.
func (*Context) DeleteSession ¶
DeleteSession delete session
func (*Context) FreshSession ¶
FreshSession set session
func (*Context) Next ¶
func (ctx *Context) Next()
Next calls the next handler in the stack, but only if the response isn't already written.
func (*Context) Param ¶
Param returns the value of the URL param. It is a shortcut for c.Params.ByName(key)
router.GET("/user/:id", func(c *gin.Context) { // a GET request to /user/john id := c.Param("id") // id == "john" })
func (*Context) Recover ¶
func (ctx *Context) Recover()
Recover recovers form panics. It logs the stack and uses the PanicHandler (or a classic Internal Server Error) to write the response.
Usage:
defer c.Recover()
func (*Context) Redirect ¶
Redirect Redirect replies to the request with a redirect to url, which may be a path relative to the request path.
func (*Context) ResStatus ¶
ResStatus Response status code, use http.StatusText to write the response.
func (*Context) SetSession ¶
SetSession set session
func (*Context) ZipHandler ¶
ZipHandler 响应下载文件请求,返回zip文件
type Controller ¶
type Controller struct {
Validate *Validation
}
Controller 控制器
func (*Controller) Err ¶
func (c *Controller) Err(errno int, message string) error
Err return a controller error
func (*Controller) GetBodyJSON ¶
func (c *Controller) GetBodyJSON(ctx *Context) map[string]interface{}
GetBodyJSON return a json from body
func (*Controller) GetEmail ¶
func (c *Controller) GetEmail(fieldName string, p interface{}) string
GetEmail check is a email
func (*Controller) Int64Range ¶
func (c *Controller) Int64Range(fieldName string, p interface{}, n int64, m int64) int64
Int64Range param must be a integer, and range is [n, m]
func (*Controller) IntMax ¶
func (c *Controller) IntMax(fieldName string, p interface{}, m int) int
IntMax param must be a integer, and range is [,m]
func (*Controller) IntMin ¶
func (c *Controller) IntMin(fieldName string, p interface{}, n int) int
IntMin param must be a integer, and range is [n,]
func (*Controller) IntRange ¶
func (c *Controller) IntRange(fieldName string, p interface{}, n int, m int) int
IntRange param must be a integer, and range is [n, m]
func (*Controller) IntRangeZoom ¶
IntRangeZoom param must be a number, and range is [n, m], tip is zoom.
func (*Controller) RegisterRouter ¶
func (c *Controller) RegisterRouter()
RegisterRouter this controller to the routers
func (*Controller) StrIn ¶
func (c *Controller) StrIn(fieldName string, p interface{}, l ...string) string
StrIn param is a string, the string is in array
func (*Controller) StrLenIn ¶
func (c *Controller) StrLenIn(fieldName string, p interface{}, l ...int) string
StrLenIn param is a string, length is in array
func (*Controller) StrLenRange ¶
func (c *Controller) StrLenRange(fieldName string, p interface{}, n int, m int) string
StrLenRange param is a string, length range is [n,m]
type DBError ¶
type DBError struct { DBName string // contains filtered or unexported fields }
DBError http.StatusInternalServerError
type Domain ¶
Requires a Domain string to be exactly
func ValidDomain ¶
func ValidDomain() Domain
func (Domain) DefaultMessage ¶
func (Domain) IsSatisfied ¶
type Email ¶
type Email struct {
Match
}
func ValidEmail ¶
func ValidEmail() Email
func (Email) DefaultMessage ¶
type Engine ¶
type Engine struct { RouterGroup // contains filtered or unexported fields }
Engine each group has a router engine
type FilePath ¶
type FilePath struct {
Mode int
}
Requires an string to be sanitary file path
func ValidFilePath ¶
func (FilePath) DefaultMessage ¶
func (FilePath) IsSatisfied ¶
type HandlersStack ¶
type HandlersStack struct { Handlers []RouterHandler // The handlers stack. PanicHandler RouterHandler // The handler called in case of panic. Useful to send custom server error information. Context.Data["panic"] contains the panic error. }
HandlersStack contains a set of handlers.
func NewHandlersStack ¶
func NewHandlersStack() *HandlersStack
NewHandlersStack returns a new NewHandlersStack.
func (*HandlersStack) HandlePanic ¶
func (hs *HandlersStack) HandlePanic(h RouterHandler)
HandlePanic sets the panic handler of the handlers stack.
Context.Data["panic"] contains the panic error.
func (*HandlersStack) ServeHTTP ¶
func (hs *HandlersStack) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP makes a context for the request, sets some good practice default headers and enters the handlers stack.
func (*HandlersStack) Use ¶
func (hs *HandlersStack) Use(h RouterHandler)
Use adds a handler to the handlers stack.
type IController ¶
IController 控制器接口定义
type ICoreError ¶
ICoreError core error interface
type IPAddr ¶
type IPAddr struct {
Vaildtypes []int
}
Requires a string(IP Address) to be within IP Pattern type inclusive.
func ValidIPAddr ¶
Requires an IP Address string to be exactly a given validation type (IPv4, IPv6, IPv4MappedIPv6, IPv4CIDR, IPv6CIDR, IPv4MappedIPv6CIDR OR IPAny)
func (IPAddr) DefaultMessage ¶
func (IPAddr) IsSatisfied ¶
type IProvider ¶
type IProvider interface { Set(rs IStore) error //设置存储的session Get(sid string) (IStore, error) //函数返回sid所代表的Session变量 Destroy(sid string) error //函数用来销毁sid对应的Session UpExpire() //刷新session有效期 }
IProvider 用以表征session管理器底层存储结构
type IRouter ¶
type IRouter interface { IRoutes Group(string, ...RouterHandler) *RouterGroup }
IRouter router interface
type IRoutes ¶
type IRoutes interface { Handle(string, string, ...RouterHandler) IRoutes Any(string, ...RouterHandler) IRoutes GET(string, ...RouterHandler) IRoutes POST(string, ...RouterHandler) IRoutes DELETE(string, ...RouterHandler) IRoutes PATCH(string, ...RouterHandler) IRoutes PUT(string, ...RouterHandler) IRoutes OPTIONS(string, ...RouterHandler) IRoutes HEAD(string, ...RouterHandler) IRoutes }
IRoutes routes interface
type IStore ¶
type IStore interface { Set(key, value string) error //设置设置key值 Get(key string) string //读取key对应的value Delete(key string) error //删除key SessionID() string //获取sid }
IStore session操作
type Length ¶
type Length struct {
N int
}
Length requires an array or string to be exactly a given length.
func ValidLength ¶
func (Length) DefaultMessage ¶
func (Length) IsSatisfied ¶
type MacAddr ¶
type MacAddr struct{}
Requires a MAC Address string to be exactly
func ValidMacAddr ¶
func ValidMacAddr() MacAddr
func (MacAddr) DefaultMessage ¶
func (MacAddr) IsSatisfied ¶
type Match ¶
Match requires a string to match a given regex.
func ValidMatch ¶
func (Match) DefaultMessage ¶
func (Match) IsSatisfied ¶
type Max ¶
type Max struct {
Max float64
}
func ValidMaxFloat ¶
func (Max) DefaultMessage ¶
func (Max) IsSatisfied ¶
type MaxSize ¶
type MaxSize struct {
Max int
}
MaxSize requires an array or string to be at most a given length.
func ValidMaxSize ¶
func (MaxSize) DefaultMessage ¶
func (MaxSize) IsSatisfied ¶
type Min ¶
type Min struct {
Min float64
}
func ValidMinFloat ¶
func (Min) DefaultMessage ¶
func (Min) IsSatisfied ¶
type MinSize ¶
type MinSize struct {
Min int
}
MinSize requires an array or string to be at least a given length.
func ValidMinSize ¶
func (MinSize) DefaultMessage ¶
func (MinSize) IsSatisfied ¶
type Model ¶
type Model struct { }
Model model struct
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError route not found.
func (*NotFoundError) GetHTTPCode ¶
func (e *NotFoundError) GetHTTPCode() int
GetHTTPCode get error HTTPCode
func (*NotFoundError) New ¶
func (e *NotFoundError) New(message string) *NotFoundError
New NotFoundError.New
type Params ¶
type Params []Param
Params is a Param-slice, as returned by the router. The slice is ordered, the first URL parameter is also the first slice value. It is therefore safe to read values by the index.
type PureText ¶
type PureText struct {
Mode int
}
Requires a string to be without invisible characters
func ValidPureText ¶
func (PureText) DefaultMessage ¶
func (PureText) IsSatisfied ¶
type Range ¶
Range requires an integer to be within Min, Max inclusive.
func ValidRange ¶
func ValidRangeFloat ¶
func (Range) DefaultMessage ¶
func (Range) IsSatisfied ¶
type Required ¶
type Required struct{}
func ValidRequired ¶
func ValidRequired() Required
func (Required) DefaultMessage ¶
func (Required) IsSatisfied ¶
type ResFormat ¶
type ResFormat struct { Ok bool `json:"ok"` Data interface{} `json:"data"` Message string `json:"message"` Errno int `json:"errno"` }
ResFormat response data
type RouterGroup ¶
type RouterGroup struct { Handlers RouterHandlerChain // contains filtered or unexported fields }
RouterGroup is used internally to configure router, a RouterGroup is associated with a prefix and an array of handlers (middleware).
func (*RouterGroup) Any ¶
func (group *RouterGroup) Any(relativePath string, handlers ...RouterHandler) IRoutes
Any registers a route that matches all the HTTP methods. GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, CONNECT, TRACE.
func (*RouterGroup) BasePath ¶
func (group *RouterGroup) BasePath() string
BasePath set group base path
func (*RouterGroup) DELETE ¶
func (group *RouterGroup) DELETE(relativePath string, handlers ...RouterHandler) IRoutes
DELETE is a shortcut for router.Handle("DELETE", path, handle).
func (*RouterGroup) GET ¶
func (group *RouterGroup) GET(relativePath string, handlers ...RouterHandler) IRoutes
GET is a shortcut for router.Handle("GET", path, handle).
func (*RouterGroup) Group ¶
func (group *RouterGroup) Group(relativePath string, handlers ...RouterHandler) *RouterGroup
Group creates a new router group. You should add all the routes that have common middlwares or the same path prefix. For example, all the routes that use a common middlware for authorization could be grouped.
func (*RouterGroup) HEAD ¶
func (group *RouterGroup) HEAD(relativePath string, handlers ...RouterHandler) IRoutes
HEAD is a shortcut for router.Handle("HEAD", path, handle).
func (*RouterGroup) Handle ¶
func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...RouterHandler) IRoutes
Handle registers a new request handle and middleware with the given path and method. The last handler should be the real handler, the other ones should be middleware that can and should be shared among different routes. See the example code in github.
For GET, POST, PUT, PATCH and DELETE requests the respective shortcut functions can be used.
This function is intended for bulk loading and to allow the usage of less frequently used, non-standardized or custom methods (e.g. for internal communication with a proxy).
func (*RouterGroup) OPTIONS ¶
func (group *RouterGroup) OPTIONS(relativePath string, handlers ...RouterHandler) IRoutes
OPTIONS is a shortcut for router.Handle("OPTIONS", path, handle).
func (*RouterGroup) PATCH ¶
func (group *RouterGroup) PATCH(relativePath string, handlers ...RouterHandler) IRoutes
PATCH is a shortcut for router.Handle("PATCH", path, handle).
func (*RouterGroup) POST ¶
func (group *RouterGroup) POST(relativePath string, handlers ...RouterHandler) IRoutes
POST is a shortcut for router.Handle("POST", path, handle).
func (*RouterGroup) PUT ¶
func (group *RouterGroup) PUT(relativePath string, handlers ...RouterHandler) IRoutes
PUT is a shortcut for router.Handle("PUT", path, handle).
func (*RouterGroup) Use ¶
func (group *RouterGroup) Use(middleware ...RouterHandler) IRoutes
Use adds middleware to the group, see example code in github.
type RouterHandlerChain ¶
type RouterHandlerChain []RouterHandler
RouterHandlerChain http handler array
type ServerError ¶
type ServerError struct {
// contains filtered or unexported fields
}
ServerError http.StatusInternalServerError
func (*ServerError) GetHTTPCode ¶
func (e *ServerError) GetHTTPCode() int
GetHTTPCode get error HTTPCode
func (*ServerError) New ¶
func (e *ServerError) New(message string) *ServerError
New ServerError.New
type Validation ¶
type Validation struct { }
Validation context manages data validation and error message.
func (*Validation) Domain ¶
func (v *Validation) Domain(str string) bool
func (*Validation) Email ¶
func (v *Validation) Email(str string) bool
func (*Validation) Length ¶
func (v *Validation) Length(obj interface{}, n int) bool
func (*Validation) MacAddr ¶
func (v *Validation) MacAddr(str string) bool
func (*Validation) MaxSize ¶
func (v *Validation) MaxSize(obj interface{}, max int) bool
func (*Validation) MinSize ¶
func (v *Validation) MinSize(obj interface{}, min int) bool
func (*Validation) Range ¶
func (v *Validation) Range(n, min, max int) bool
func (*Validation) Range64 ¶
func (v *Validation) Range64(n, min, max int64) bool
func (*Validation) RangeFloat ¶
func (v *Validation) RangeFloat(n, min, max float64) bool
func (*Validation) Required ¶
func (v *Validation) Required(obj interface{}) bool
Required tests that the argument is non-nil and non-empty (if string or list)
func (*Validation) URL ¶
func (v *Validation) URL(str string) bool
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError simple struct to store the Message & Key of a validation error
func (*ValidationError) GetErrno ¶
func (e *ValidationError) GetErrno() int
GetErrno get error Errno
func (*ValidationError) GetHTTPCode ¶
func (e *ValidationError) GetHTTPCode() int
GetHTTPCode get error HTTPCode
func (*ValidationError) New ¶
func (e *ValidationError) New(message string) *ValidationError
New ValidationError.New
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package httputil provides HTTP utility functions, complementing the most common ones in package net/http.
|
Package httputil provides HTTP utility functions, complementing the most common ones in package net/http. |
Package log implements a simple logging package for handlers usage.
|
Package log implements a simple logging package for handlers usage. |