22 lines
534 B
Go
22 lines
534 B
Go
package config
|
|
|
|
import "flag"
|
|
|
|
const (
|
|
FlagConfigDirName = "config-dir"
|
|
FlagLogConfigFilePathName = "log-config-path"
|
|
FlagPidFilePathName = "pid-path"
|
|
)
|
|
|
|
func FlagConfigDir() *string {
|
|
return flag.String(FlagConfigDirName, "./config.json", "The directory path of config")
|
|
}
|
|
|
|
func FlagLogConfigFilePath() *string {
|
|
return flag.String(FlagLogConfigFilePathName, "", "The file path of logging config")
|
|
}
|
|
|
|
func FlagPidFilePath() *string {
|
|
return flag.String(FlagPidFilePathName, "./pid.pid", "The file path of pid")
|
|
}
|