overflow_commons_go/config/config.go

22 lines
534 B
Go
Raw Normal View History

2017-12-01 09:44:28 +00:00
package config
import "flag"
2018-03-20 15:17:41 +00:00
const (
2018-03-21 09:36:57 +00:00
FlagConfigDirName = "config-dir"
FlagLogConfigFilePathName = "log-config-path"
FlagPidFilePathName = "pid-path"
2018-03-20 15:17:41 +00:00
)
2017-12-01 09:44:28 +00:00
func FlagConfigDir() *string {
2018-03-21 09:36:57 +00:00
return flag.String(FlagConfigDirName, "./config.json", "The directory path of config")
}
func FlagLogConfigFilePath() *string {
2018-03-21 09:38:39 +00:00
return flag.String(FlagLogConfigFilePathName, "", "The file path of logging config")
2018-03-21 09:36:57 +00:00
}
func FlagPidFilePath() *string {
return flag.String(FlagPidFilePathName, "./pid.pid", "The file path of pid")
2017-12-01 09:44:28 +00:00
}