version

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "version",
	Short: "View version and commit information",
	Run: func(cmd *cobra.Command, args []string) {
		semver := build.Semver()
		commit := build.Commit()

		if build.IsDefined(semver) {
			fmt.Printf("Version: %s\n", semver)
		}
		if build.IsDefined(commit) {
			fmt.Printf("Commit: %s\n", commit)
		}

		if !build.IsDefined(semver) && !build.IsDefined(commit) {
			fmt.Printf("Version information unknown!\n")
		}
	},
}

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