github.com/bytom/bytom@v1.1.2-0.20221014091027-bbcba3df6075/cmd/bytomcli/commands/version.go (about)

     1  package commands
     2  
     3  import (
     4  	"runtime"
     5  
     6  	"github.com/spf13/cobra"
     7  	jww "github.com/spf13/jwalterweatherman"
     8  
     9  	"github.com/bytom/bytom/version"
    10  )
    11  
    12  var versionCmd = &cobra.Command{
    13  	Use:   "version",
    14  	Short: "Print the version number of Bytomcli",
    15  	Run: func(cmd *cobra.Command, args []string) {
    16  		jww.FEEDBACK.Printf("Bytomcli v%s %s/%s\n", version.Version, runtime.GOOS, runtime.GOARCH)
    17  	},
    18  }