version

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"

	Date    = "unknown"
	BuiltBy = "unknown"
)
View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "display the webman version",
	Long: `
The "version" subcommand displays the latest webman version.`,
	Example: `webman version`,
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) != 0 {
			return cmd.Help()
		}
		color.Cyan("webman (%s)", Version)
		verLen := 8
		if len(Commit) < 8 {
			verLen = len(Commit)
		}
		Commit = Commit[:verLen]
		if dirty {
			Commit += " (with changes)"
		}
		color.Yellow("Commit %s", Commit)
		dateLen := 10
		if len(Date) < 10 {
			dateLen = len(Date)
		}
		color.Magenta("Built on %s by %s", Date[:dateLen], BuiltBy)
		color.HiBlack("Created by candrewlee14")
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL