info

package
v0.0.0-...-1bad096 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BuildDate is the last build datetime, overriden as ldflag
	BuildDate = ""

	// Compiler is the the compiler toolchain that built the running binary
	Compiler = fmt.Sprintf("%s/%s", runtime.Compiler, runtime.Version())

	// GitCommit is the last commit SHA string, overriden as ldflag
	GitCommit = ""

	// Platform is the system OS and architecture binary is built for
	Platform = fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)

	// Version is the Calendar Versioning string, overriden as ldflag
	Version = ""

	// Cmd prints application information
	Cmd = &cobra.Command{
		Use:   "info",
		Short: "Print application information",
		Run: func(cmd *cobra.Command, args []string) {
			fmt.Println("BuildDate:", BuildDate)
			fmt.Println("Compiler: ", Compiler)
			fmt.Println("GitCommit:", GitCommit)
			fmt.Println("Platform: ", Platform)
			fmt.Println("Version:  ", Version)
		},
	}
)

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