Change setup function name
This commit is contained in:
parent
30c24998be
commit
f5a875b743
|
@ -23,10 +23,12 @@ type (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func init() {
|
||||||
confection.Setup()
|
confection.SetupFlags()
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
conf := Config{
|
conf := Config{
|
||||||
DatabaseConfig: DatabaseConfig{},
|
DatabaseConfig: DatabaseConfig{},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ var (
|
||||||
serverPort int
|
serverPort int
|
||||||
)
|
)
|
||||||
|
|
||||||
func Setup() {
|
func SetupFlags() {
|
||||||
flag.StringVar(&configPath, "config", "config.json", "Path to config file")
|
flag.StringVar(&configPath, "config", "config.json", "Path to config file")
|
||||||
flag.IntVar(&serverPort, "config-port", 5050, "Config manager http port")
|
flag.IntVar(&serverPort, "config-port", 5050, "Config manager http port")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue