Files
stack/components/ledger/cmd/version.go
2023-01-31 12:22:52 +01:00

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,
}
}