github.com/shrimpyuk/bor@v0.2.15-0.20220224151350-fb4ec6020bae/internal/cli/version.go (about)

     1  package cli
     2  
     3  import (
     4  	"github.com/ethereum/go-ethereum/params"
     5  	"github.com/mitchellh/cli"
     6  )
     7  
     8  // VersionCommand is the command to show the version of the agent
     9  type VersionCommand struct {
    10  	UI cli.Ui
    11  }
    12  
    13  // Help implements the cli.Command interface
    14  func (c *VersionCommand) Help() string {
    15  	return `Usage: bor version
    16  
    17    Display the Bor version`
    18  }
    19  
    20  // Synopsis implements the cli.Command interface
    21  func (c *VersionCommand) Synopsis() string {
    22  	return "Display the Bor version"
    23  }
    24  
    25  // Run implements the cli.Command interface
    26  func (c *VersionCommand) Run(args []string) int {
    27  	c.UI.Output(params.VersionWithMeta)
    28  
    29  	return 0
    30  }