Skip to content

Commit 521cf53

Browse files
committed
Updated docs
Signed-off-by: Vishal Rana <[email protected]>
1 parent d932e2a commit 521cf53

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

echo.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func New() (e *Echo) {
197197
// Defaults
198198
//----------
199199

200-
e.HTTP2()
200+
e.HTTP2(true)
201201
e.defaultHTTPErrorHandler = func(err error, c *Context) {
202202
code := http.StatusInternalServerError
203203
msg := http.StatusText(code)
@@ -238,9 +238,9 @@ func SetLogLevel(l log.Level) {
238238
log.SetLevel(l)
239239
}
240240

241-
// HTTP2 enables HTTP2 support.
242-
func (e *Echo) HTTP2() {
243-
e.http2 = true
241+
// HTTP2 enables/disables HTTP2 support.
242+
func (e *Echo) HTTP2(on bool) {
243+
e.http2 = on
244244
}
245245

246246
// DefaultHTTPErrorHandler invokes the default HTTP error handler.
@@ -273,7 +273,7 @@ func (e *Echo) Debug() bool {
273273
return e.debug
274274
}
275275

276-
// AutoIndex enables automatically creates a directory listing if the directory
276+
// AutoIndex enables/disables automatically creates a directory listing if the directory
277277
// doesn't contain an index page.
278278
func (e *Echo) AutoIndex(on bool) {
279279
e.autoIndex = on

website/content/guide/customization.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,17 @@ SetOutput sets the output destination for the global logger.
3737

3838
SetLogLevel sets the log level for global logger. The default value is `log.INFO`.
3939

40+
### HTTP2
41+
42+
`echo#HTTP(on bool)`
43+
44+
HTTP2 enables/disables HTTP2 support.
45+
4046
### Auto index
4147

4248
`Echo#AutoIndex(on bool)`
4349

44-
AutoIndex enables automatically creates a directory listing if the directory doesn't
50+
AutoIndex enables/disables automatically creates a directory listing if the directory doesn't
4551
contain an index page.
4652

4753
*Example*

0 commit comments

Comments
 (0)