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) {
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.
278278func (e * Echo ) AutoIndex (on bool ) {
279279 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.
3737
3838SetLogLevel 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
4551contain an index page.
4652
4753* Example*
You can’t perform that action at this time.
0 commit comments