diff options
author | Kenji Siu <kenji@isuntv.com> | 2016-11-10 19:00:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-11-10 19:00:09 +0800 |
commit | 80ea44c485c42032aa954f2a8580e3afb4aa5339 (patch) | |
tree | 91fa1e5c5ecfdcb35dba80a17458a1e50d97b96a /cmd/geth/main.go | |
parent | dba29970d7ff097762b637b5e7ff95fc1433856a (diff) | |
download | go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar.gz go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar.bz2 go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar.lz go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar.xz go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.tar.zst go-tangerine-80ea44c485c42032aa954f2a8580e3afb4aa5339.zip |
cmd/geth: improve command help messages (#3227)
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f21c37d7a..0eab77f7e 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -61,6 +61,7 @@ func init() { // Initialize the CLI app and start Geth app.Action = geth app.HideVersion = true // we have a command to print the version + app.Copyright = "Copyright 2013-2016 The go-ethereum Authors" app.Commands = []cli.Command{ importCommand, exportCommand, @@ -74,9 +75,11 @@ func init() { attachCommand, javascriptCommand, { - Action: makedag, - Name: "makedag", - Usage: "generate ethash dag (for testing)", + Action: makedag, + Name: "makedag", + Usage: "Generate ethash DAG (for testing)", + ArgsUsage: "<blockNum> <outputDir>", + Category: "MISCELLANEOUS COMMANDS", Description: ` The makedag command generates an ethash DAG in /tmp/dag. @@ -85,27 +88,33 @@ Regular users do not need to execute it. `, }, { - Action: version, - Name: "version", - Usage: "print ethereum version numbers", + Action: version, + Name: "version", + Usage: "Print version numbers", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", Description: ` The output of this command is supposed to be machine-readable. `, }, { - Action: initGenesis, - Name: "init", - Usage: "bootstraps and initialises a new genesis block (JSON)", + Action: initGenesis, + Name: "init", + Usage: "Bootstrap and initialize a new genesis block", + ArgsUsage: "<genesisPath>", + Category: "BLOCKCHAIN COMMANDS", Description: ` -The init command initialises a new genesis block and definition for the network. +The init command initializes a new genesis block and definition for the network. This is a destructive action and changes the network in which you will be participating. `, }, { - Action: license, - Name: "license", - Usage: "displays geth's license information", + Action: license, + Name: "license", + Usage: "Display license information", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", }, } @@ -335,23 +344,22 @@ func makedag(ctx *cli.Context) error { return nil } -func version(c *cli.Context) error { +func version(ctx *cli.Context) error { fmt.Println(strings.Title(clientIdentifier)) fmt.Println("Version:", utils.Version) if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } fmt.Println("Protocol Versions:", eth.ProtocolVersions) - fmt.Println("Network Id:", c.GlobalInt(utils.NetworkIdFlag.Name)) + fmt.Println("Network Id:", ctx.GlobalInt(utils.NetworkIdFlag.Name)) fmt.Println("Go Version:", runtime.Version()) fmt.Println("OS:", runtime.GOOS) fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) - return nil } -func license(c *cli.Context) error { +func license(_ *cli.Context) error { fmt.Println(`Geth is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -365,6 +373,5 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with geth. If not, see <http://www.gnu.org/licenses/>. `) - return nil } |