INNER CODE UNIT · Go

main

bitpoke/mysql-operator · cmd/mysql-operator/main.go:40

func main() {
	pflag.CommandLine.AddGoFlagSet(flag.CommandLine)

	debug := false
	pflag.CommandLine.BoolVar(&debug, "debug", false, "Set logger in debug mode")

	opt := options.GetOptions()
	opt.AddFlags(pflag.CommandLine)
	pflag.Parse()

	// set logging
	klogFlags := flag.NewFlagSet("klog", flag.ExitOnError)
	klog.InitFlags(klogFlags)
	klogFlags.Set("logtostderr", "true")      // nolint: errcheck
	klogFlags.Set("alsologtostderr", "false") // nolint: errcheck

	logf.SetLogger(klogr.New())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…