INNER CODE UNIT · Go

parseFlags

kubernetes/dns · cmd/dnsmasq-nanny/main.go:48

func parseFlags() {
	opts.DnsmasqArgs = dnsmasq.ExtractDnsmasqArgs(&os.Args)

	flag.Usage = func() {
		fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
		fmt.Fprintf(os.Stderr, `
Manages the dnsmasq daemon, handles configuration given by the ConfigMap.
Any arguments given after "--" will be passed directly to dnsmasq itself.

`)
		flag.PrintDefaults()
	}

	flag.StringVar(&opts.DnsmasqExec, "dnsmasqExec", opts.DnsmasqExec,
		"location of the dnsmasq executable")
	flag.BoolVar(&opts.RestartOnChange, "restartDnsmasq",
		opts.RestartOnChange,
		"if true, restart dnsmasq when the configuration changes")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…