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
|
|
|
)
|
|
|
|
|
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
|
|
|
}
|