From 7e5aff8ea7456c90f0e362c1e23a192416cbbab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=AC=A7?= Date: Tue, 21 Nov 2017 10:03:57 +0800 Subject: [PATCH] simple code and increase coverage (#1174) --- mode.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mode.go b/mode.go index 393e13ec..394bebee 100644 --- a/mode.go +++ b/mode.go @@ -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