simple code and increase coverage (#1174)

This commit is contained in:
田欧 2017-11-21 10:03:57 +08:00 committed by Bo-Yi Wu
parent 1f377cb847
commit 7e5aff8ea7

View File

@ -39,16 +39,12 @@ var modeName = DebugMode
func init() {
mode := os.Getenv(ENV_GIN_MODE)
if mode == "" {
SetMode(DebugMode)
} else {
SetMode(mode)
}
SetMode(mode)
}
func SetMode(value string) {
switch value {
case DebugMode:
case DebugMode, "":
ginMode = debugCode
case ReleaseMode:
ginMode = releaseCode