INNER CODE UNIT · Go

main

openclarity/openclarity · api/server/cmd/main.go:74

func main() {
	cobra.CheckErr(rootCmd.Execute())
}

// Main entry point for the API server, triggered by the `run` command.
func runCommand(_ *cobra.Command, _ []string) {
	log.InitLogger(logLevel, os.Stderr)

	ctx := context.Background()
	logger := logrus.WithContext(ctx)
	ctx = log.SetLoggerForContext(ctx, logger)

	config, err := server.NewConfig()
	if err != nil {
		logger.Fatalf("failed to load API server config: %v", err)
	}

	server.Run(ctx, config)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…