version

package
v0.0.0-...-f584327 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is version of binary
	Version string

	// Storage is the storage engine used by this binary
	Storage string

	// GitSHA is the SHA of commit
	GitSHA string

	// GoVersion is the version of go compiler
	GoVersion string

	// GoOsArch is the os and arch of the binary
	GoOsArch string

	// Date is the time when binary is build
	Date string
)

values will be injected while building

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "show version",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("KubeBrain")
		fmt.Println("Version:   \t", Version)
		fmt.Println("Storage:   \t", Storage)
		fmt.Println("Git SHA:   \t", GitSHA)
		fmt.Println("Go Version:\t", GoVersion)
		fmt.Println("Go OS/Arch:\t", GoOsArch)
		fmt.Println("BuildTime: \t", Date)
	},
}

VersionCmd is the cobra.Command for print version info

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