mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
22 lines
362 B
Go
22 lines
362 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func PrintVersion(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("Version: %s \n", Version)
|
|
fmt.Printf("Date: %s \n", BuildDate)
|
|
fmt.Printf("Commit: %s \n", Commit)
|
|
}
|
|
|
|
func NewVersion() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "version",
|
|
Short: "Get version",
|
|
Run: PrintVersion,
|
|
}
|
|
}
|