overflow_commons_go/config/config.go

24 lines
632 B
Go
Raw Permalink 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 11:32:18 +00:00
ConfigFileName = "config.json"
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
)
2018-03-21 09:39:50 +00:00
func FlagConfigDir(defaultValue string) *string {
return flag.String(FlagConfigDirName, defaultValue, "The directory path of config")
2018-03-21 09:36:57 +00:00
}
2018-03-21 09:39:50 +00:00
func FlagLogConfigFilePath(defaultValue string) *string {
return flag.String(FlagLogConfigFilePathName, defaultValue, "The file path of logging config")
2018-03-21 09:36:57 +00:00
}
2018-03-21 09:39:50 +00:00
func FlagPidFilePath(defaultValue string) *string {
return flag.String(FlagPidFilePathName, defaultValue, "The file path of pid")
2017-12-01 09:44:28 +00:00
}