21 lines
400 B
Go
21 lines
400 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
Version string = "dev"
|
|
Commit string = "none"
|
|
)
|
|
|
|
var Cmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print version information",
|
|
Long: `Print the WorkTime version information of this WorkTime binary`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("WorkTime. Version: %s, Commit: %s\n", Version, Commit)
|
|
},
|
|
}
|