|
|
@ -14,6 +14,8 @@ const (
|
|
|
|
DevMode = "dev"
|
|
|
|
DevMode = "dev"
|
|
|
|
// TestMode means test mode.
|
|
|
|
// TestMode means test mode.
|
|
|
|
TestMode = "test"
|
|
|
|
TestMode = "test"
|
|
|
|
|
|
|
|
// RtMode means rt mode.
|
|
|
|
|
|
|
|
RtMode = "rt"
|
|
|
|
// PreMode means pre-release mode.
|
|
|
|
// PreMode means pre-release mode.
|
|
|
|
PreMode = "pre"
|
|
|
|
PreMode = "pre"
|
|
|
|
// ProMode means production mode.
|
|
|
|
// ProMode means production mode.
|
|
|
@ -56,7 +58,7 @@ func (sc ServiceConf) SetUp() error {
|
|
|
|
|
|
|
|
|
|
|
|
func (sc ServiceConf) initMode() {
|
|
|
|
func (sc ServiceConf) initMode() {
|
|
|
|
switch sc.Mode {
|
|
|
|
switch sc.Mode {
|
|
|
|
case DevMode, TestMode, PreMode:
|
|
|
|
case DevMode, TestMode, RtMode, PreMode:
|
|
|
|
load.Disable()
|
|
|
|
load.Disable()
|
|
|
|
stat.SetReporter(nil)
|
|
|
|
stat.SetReporter(nil)
|
|
|
|
}
|
|
|
|
}
|
|
|
|