File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ func New() (e *Echo) {
197
197
// Defaults
198
198
//----------
199
199
200
- e .HTTP2 ()
200
+ e .HTTP2 (true )
201
201
e .defaultHTTPErrorHandler = func (err error , c * Context ) {
202
202
code := http .StatusInternalServerError
203
203
msg := http .StatusText (code )
@@ -238,9 +238,9 @@ func SetLogLevel(l log.Level) {
238
238
log .SetLevel (l )
239
239
}
240
240
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
244
244
}
245
245
246
246
// DefaultHTTPErrorHandler invokes the default HTTP error handler.
@@ -273,7 +273,7 @@ func (e *Echo) Debug() bool {
273
273
return e .debug
274
274
}
275
275
276
- // AutoIndex enables automatically creates a directory listing if the directory
276
+ // AutoIndex enables/disables automatically creates a directory listing if the directory
277
277
// doesn't contain an index page.
278
278
func (e * Echo ) AutoIndex (on bool ) {
279
279
e .autoIndex = on
Original file line number Diff line number Diff line change @@ -37,11 +37,17 @@ SetOutput sets the output destination for the global logger.
37
37
38
38
SetLogLevel sets the log level for global logger. The default value is ` log.INFO ` .
39
39
40
+ ### HTTP2
41
+
42
+ ` echo#HTTP(on bool) `
43
+
44
+ HTTP2 enables/disables HTTP2 support.
45
+
40
46
### Auto index
41
47
42
48
` Echo#AutoIndex(on bool) `
43
49
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
45
51
contain an index page.
46
52
47
53
* Example*
You can’t perform that action at this time.
0 commit comments