INNER CODE UNIT · Go

init

derailed/popeye · cmd/version.go:14

func init() {
	rootCmd.AddCommand(versionCmd())
}

func versionCmd() *cobra.Command {
	return &cobra.Command{
		Use:   "version",
		Short: "Prints version/build info",
		Long:  "Prints version/build information",
		Run: func(cmd *cobra.Command, args []string) {
			printVersion()
		},
	}
}

func printVersion() {
	printLogo(report.ColorAqua, report.ColorLighSlate)
	printTuple("Version", version)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…