in config/config.go [173:193]
func ParseCliArgs(logger *log.Logger, service string, version string) *CLIConfig {
args := new(CLIConfig)
app := cli.App(service, "Utility to echo the DC and Cloud Infrastructure")
app.Version("v version", "Arachne "+version)
app.Spec = "[--foreground] [-c=<config_file>] [--receiver_only] [--sender_only]"
args.Foreground = app.BoolOpt("foreground", false, "Force foreground mode")
args.ConfigFile = app.StringOpt("c config_file", defaultConfigFile,
fmt.Sprintf("Agent's primary yaml configuration file (by default: %s)", defaultConfigFile))
args.ReceiverOnlyMode = app.BoolOpt("receiver_only", false, "Force TCP receiver-only mode")
args.SenderOnlyMode = app.BoolOpt("sender_only", false, "Force TCP sender-only mode")
app.Action = func() {
logger.Debug("Command line arguments parsed")
}
app.Run(os.Args)
return args
}