From 0ed259ca34d5af4e91a9820dd1923b89f6bb58d5 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Thu, 21 Aug 2014 01:01:05 +0200 Subject: [PATCH] Adds TestMode --- mode.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mode.go b/mode.go index 803a2ec..85f133b 100644 --- a/mode.go +++ b/mode.go @@ -9,10 +9,12 @@ const GIN_MODE = "GIN_MODE" const ( DebugMode string = "debug" ReleaseMode string = "release" + TestMode string = "test" ) const ( debugCode = iota releaseCode = iota + testCode = iota ) var gin_mode int = debugCode @@ -23,6 +25,8 @@ func SetMode(value string) { gin_mode = debugCode case ReleaseMode: gin_mode = releaseCode + case TestMode: + gin_mode = testCode default: panic("gin mode unknown, the allowed modes are: " + DebugMode + " and " + ReleaseMode) }