Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "version", Short: "Print the version string", Long: `use clog -v to display the short semantic version string.`, Run: func(parent *cobra.Command, args []string) { _, file, _, _ := runtime.Caller(0) slog.Debug(fmt.Sprintf("run command: %s", file)) if len(args) == 0 { fmt.Printf("%s (%s) %s\n", crayon.ColorCapitals(config.Cfg().GetString("title"), nil, nil), config.Cfg().GetString("app"), config.Cfg().GetString("clog.version.long")) os.Exit(0) } if args[0] == "short" { fmt.Println(config.Cfg().GetString("ver")) os.Exit(0) } if args[0] == "note" { fmt.Println(config.Cfg().GetString("clog.version.note")) os.Exit(0) } slog.Error("unknown version argument (" + args[0] + ")") os.Exit(1) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.