mirror of
https://github.com/labstack/echo.git
synced 2024-11-24 08:22:21 +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
|
||||
//----------
|
||||
|
||||
e.HTTP2()
|
||||
e.HTTP2(true)
|
||||
e.defaultHTTPErrorHandler = func(err error, c *Context) {
|
||||
code := http.StatusInternalServerError
|
||||
msg := http.StatusText(code)
|
||||
@ -238,9 +238,9 @@ func SetLogLevel(l log.Level) {
|
||||
log.SetLevel(l)
|
||||
}
|
||||
|
||||
// HTTP2 enables HTTP2 support.
|
||||
func (e *Echo) HTTP2() {
|
||||
e.http2 = true
|
||||
// HTTP2 enables/disables HTTP2 support.
|
||||
func (e *Echo) HTTP2(on bool) {
|
||||
e.http2 = on
|
||||
}
|
||||
|
||||
// DefaultHTTPErrorHandler invokes the default HTTP error handler.
|
||||
@ -273,7 +273,7 @@ func (e *Echo) Debug() bool {
|
||||
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.
|
||||
func (e *Echo) AutoIndex(on bool) {
|
||||
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`.
|
||||
|
||||
### HTTP2
|
||||
|
||||
`echo#HTTP(on bool)`
|
||||
|
||||
HTTP2 enables/disables HTTP2 support.
|
||||
|
||||
### Auto index
|
||||
|
||||
`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.
|
||||
|
||||
*Example*
|
||||
|
Loading…
Reference in New Issue
Block a user