Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "sitectl", Short: "Interact with your docker compose site", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { level := slog.LevelInfo ll, err := cmd.Flags().GetString("log-level") if err != nil { return err } switch strings.ToUpper(ll) { case "DEBUG": level = slog.LevelDebug case "WARN": level = slog.LevelWarn case "ERROR": level = slog.LevelError } opts := &slog.HandlerOptions{ Level: level, } handler := slog.New(slog.NewTextHandler(os.Stdout, opts)) slog.SetDefault(handler) return nil }, }
Functions ¶
func SetVersionInfo ¶
func SetVersionInfo(version, commit, date string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.