constellation/cli/internal/cmd/version.go

21 lines
495 B
Go
Raw Normal View History

package cmd
import (
2022-04-06 08:36:58 +00:00
"github.com/edgelesssys/constellation/internal/constants"
"github.com/spf13/cobra"
)
2022-06-08 06:14:28 +00:00
// NewVerifyCmd returns a new cobra.Command for the verify command.
func NewVersionCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "version",
Short: "Display version of this CLI",
Long: "Display version of this CLI.",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
cmd.Printf("CLI Version: v%s \n", constants.VersionInfo)
},
}
return cmd
}