You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
schnutibox/cmd/version.go

25 lines
400 B
Go

//nolint:gochecknoglobals
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// nolint: gochecknoglobals
var (
version = "dev"
commit = "none"
date = "unknown"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print version",
Run: func(cmd *cobra.Command, args []string) {
// nolint: forbidigo
fmt.Printf("schnutibox %s, commit %s, %s", version, commit, date)
},
}