mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46:43 +00:00
30 lines
625 B
Go
30 lines
625 B
Go
package main
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/params"
|
|
"github.com/mitchellh/cli"
|
|
)
|
|
|
|
// VersionCommand is the command to show the version of the agent
|
|
type VersionCommand struct {
|
|
UI cli.Ui
|
|
}
|
|
|
|
// Help implements the cli.Command interface
|
|
func (c *VersionCommand) Help() string {
|
|
return `Usage: bor version
|
|
|
|
Display the Bor version`
|
|
}
|
|
|
|
// Synopsis implements the cli.Command interface
|
|
func (c *VersionCommand) Synopsis() string {
|
|
return "Display the Bor version"
|
|
}
|
|
|
|
// Run implements the cli.Command interface
|
|
func (c *VersionCommand) Run(args []string) int {
|
|
c.UI.Output(params.VersionWithMeta)
|
|
|
|
return 0
|
|
}
|