INNER CODE UNIT · Go

main

kimdre/doco-cd · cmd/doco-cd/main.go:131

func main() {
	// split to app to make defer work when os.Exit().
	if err := run(); err != nil {
		slog.Error("application stopped with error", logger.ErrAttr(err))
		os.Exit(1)
	}

	slog.Info("application stopped normally")
}

// run is the main entry point for the application.
// It initializes the application, sets up necessary resources, and starts the server.
func run() error {
	ctx, rootCancel := context.WithCancel(context.Background())

	defer rootCancel()

	// Set the default log level to debug

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…