overflow_commons_go/config/config.go
crusader 179e9c6987 ing
2018-03-21 20:32:18 +09:00

24 lines
632 B
Go

package config
import "flag"
const (
ConfigFileName = "config.json"
FlagConfigDirName = "config-dir"
FlagLogConfigFilePathName = "log-config-path"
FlagPidFilePathName = "pid-path"
)
func FlagConfigDir(defaultValue string) *string {
return flag.String(FlagConfigDirName, defaultValue, "The directory path of config")
}
func FlagLogConfigFilePath(defaultValue string) *string {
return flag.String(FlagLogConfigFilePathName, defaultValue, "The file path of logging config")
}
func FlagPidFilePath(defaultValue string) *string {
return flag.String(FlagPidFilePathName, defaultValue, "The file path of pid")
}