mirror of
https://github.com/labstack/echo.git
synced 2025-04-27 12:32:09 +02:00
Updated docs
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
d932e2a863
commit
521cf5338e
10
echo.go
10
echo.go
@ -197,7 +197,7 @@ func New() (e *Echo) {
|
|||||||
// Defaults
|
// Defaults
|
||||||
//----------
|
//----------
|
||||||
|
|
||||||
e.HTTP2()
|
e.HTTP2(true)
|
||||||
e.defaultHTTPErrorHandler = func(err error, c *Context) {
|
e.defaultHTTPErrorHandler = func(err error, c *Context) {
|
||||||
code := http.StatusInternalServerError
|
code := http.StatusInternalServerError
|
||||||
msg := http.StatusText(code)
|
msg := http.StatusText(code)
|
||||||
@ -238,9 +238,9 @@ func SetLogLevel(l log.Level) {
|
|||||||
log.SetLevel(l)
|
log.SetLevel(l)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP2 enables HTTP2 support.
|
// HTTP2 enables/disables HTTP2 support.
|
||||||
func (e *Echo) HTTP2() {
|
func (e *Echo) HTTP2(on bool) {
|
||||||
e.http2 = true
|
e.http2 = on
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultHTTPErrorHandler invokes the default HTTP error handler.
|
// DefaultHTTPErrorHandler invokes the default HTTP error handler.
|
||||||
@ -273,7 +273,7 @@ func (e *Echo) Debug() bool {
|
|||||||
return e.debug
|
return e.debug
|
||||||
}
|
}
|
||||||
|
|
||||||
// AutoIndex enables automatically creates a directory listing if the directory
|
// AutoIndex enables/disables automatically creates a directory listing if the directory
|
||||||
// doesn't contain an index page.
|
// doesn't contain an index page.
|
||||||
func (e *Echo) AutoIndex(on bool) {
|
func (e *Echo) AutoIndex(on bool) {
|
||||||
e.autoIndex = on
|
e.autoIndex = on
|
||||||
|
@ -37,11 +37,17 @@ SetOutput sets the output destination for the global logger.
|
|||||||
|
|
||||||
SetLogLevel sets the log level for global logger. The default value is `log.INFO`.
|
SetLogLevel sets the log level for global logger. The default value is `log.INFO`.
|
||||||
|
|
||||||
|
### HTTP2
|
||||||
|
|
||||||
|
`echo#HTTP(on bool)`
|
||||||
|
|
||||||
|
HTTP2 enables/disables HTTP2 support.
|
||||||
|
|
||||||
### Auto index
|
### Auto index
|
||||||
|
|
||||||
`Echo#AutoIndex(on bool)`
|
`Echo#AutoIndex(on bool)`
|
||||||
|
|
||||||
AutoIndex enables automatically creates a directory listing if the directory doesn't
|
AutoIndex enables/disables automatically creates a directory listing if the directory doesn't
|
||||||
contain an index page.
|
contain an index page.
|
||||||
|
|
||||||
*Example*
|
*Example*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user