Print warning log when user create one engine using gin.Default in debug mode (#1121)

* empty string check

* add log when use Default

* fix unit test error

* fix unit test error
This commit is contained in:
田欧
2017-09-28 22:58:57 -05:00
committed by Bo-Yi Wu
parent 3b300929e8
commit 0cb7c44abc
3 changed files with 25 additions and 0 deletions

1
gin.go
View File

@ -144,6 +144,7 @@ func New() *Engine {
// Default returns an Engine instance with the Logger and Recovery middleware already attached.
func Default() *Engine {
debugPrintWARNINGDefault()
engine := New()
engine.Use(Logger(), Recovery())
return engine