Skip to content

Commit

Permalink
simple code and increase coverage (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored and appleboy committed Nov 21, 2017
1 parent 1f377cb commit 7e5aff8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e5aff8

Please sign in to comment.