INNER CODE UNIT · Go

main

kubeai-project/kubeai · cmd/main.go:28

func main() {
	// Flag parsing can cause a panic if done inside of command.Run() and called in a goroutine (as in tests).
	// So we parse flags here.
	opts := zap.Options{
		Development: true,
	}
	opts.BindFlags(flag.CommandLine)
	flag.Parse()
	ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))

	configPath := os.Getenv("CONFIG_PATH")
	if configPath == "" {
		configPath = "./config.yaml"
	}

	sysCfg, err := manager.LoadConfigFile(configPath)
	if err != nil {
		manager.Log.Error(err, "failed to load config file", "path", configPath)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…