diff --git a/cmd/haoadm/main.go b/cmd/haoadm/main.go index a5ac9c6..21c4335 100644 --- a/cmd/haoadm/main.go +++ b/cmd/haoadm/main.go @@ -13,7 +13,6 @@ import ( ) func main() { - config.App = &config.Configuration{} appm := &cli.App{ Name: "haoadm", diff --git a/cmd/haobase/main.go b/cmd/haobase/main.go index 0643004..b523592 100644 --- a/cmd/haobase/main.go +++ b/cmd/haobase/main.go @@ -17,7 +17,6 @@ import ( ) func main() { - config.App = &config.Configuration{} appm := &cli.App{ Name: "haobase", UsageText: "Issues: https://github.com/yzimhao/trading_engine/issues", diff --git a/cmd/haomatch/main.go b/cmd/haomatch/main.go index 41dae2b..f55dbcc 100644 --- a/cmd/haomatch/main.go +++ b/cmd/haomatch/main.go @@ -12,7 +12,6 @@ import ( ) func main() { - config.App = &config.Configuration{} appm := &cli.App{ Name: "haomatch", UsageText: "Issues: https://github.com/yzimhao/trading_engine/issues", diff --git a/cmd/haoquote/main.go b/cmd/haoquote/main.go index 6719776..b98ea61 100644 --- a/cmd/haoquote/main.go +++ b/cmd/haoquote/main.go @@ -12,7 +12,6 @@ import ( ) func main() { - config.App = &config.Configuration{} appm := &cli.App{ Name: "haoquote", UsageText: "Issues: https://github.com/yzimhao/trading_engine/issues", diff --git a/config/app_config.go b/config/app_config.go index 15184b8..b958d99 100644 --- a/config/app_config.go +++ b/config/app_config.go @@ -4,6 +4,10 @@ var ( App *Configuration ) +func init() { + App = &Configuration{} +} + type ModeType string const (