optimize code

This commit is contained in:
Flc゛ 2023-04-27 12:40:23 +08:00
parent 486673a7aa
commit 98bdb06eee

3
gin.go
View File

@ -220,8 +220,7 @@ func Default(opts ...OptionFunc) *Engine {
debugPrintWARNINGDefault()
engine := New()
engine.Use(Logger(), Recovery())
engine.With(opts...)
return engine
return engine.With(opts...)
}
func (engine *Engine) Handler() http.Handler {