aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethkey/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ethkey/main.go')
-rw-r--r--cmd/ethkey/main.go33
1 files changed, 15 insertions, 18 deletions
diff --git a/cmd/ethkey/main.go b/cmd/ethkey/main.go
index b9b7a18e0..2a9e5ee48 100644
--- a/cmd/ethkey/main.go
+++ b/cmd/ethkey/main.go
@@ -28,40 +28,37 @@ const (
defaultKeyfileName = "keyfile.json"
)
-var (
- gitCommit = "" // Git SHA1 commit hash of the release (set via linker flags)
+// Git SHA1 commit hash of the release (set via linker flags)
+var gitCommit = ""
- app *cli.App // the main app instance
-)
+var app *cli.App
-var ( // Commonly used command line flags.
+func init() {
+ app = utils.NewApp(gitCommit, "an Ethereum key manager")
+ app.Commands = []cli.Command{
+ commandGenerate,
+ commandInspect,
+ commandSignMessage,
+ commandVerifyMessage,
+ }
+}
+
+// Commonly used command line flags.
+var (
passphraseFlag = cli.StringFlag{
Name: "passwordfile",
Usage: "the file that contains the passphrase for the keyfile",
}
-
jsonFlag = cli.BoolFlag{
Name: "json",
Usage: "output JSON instead of human-readable format",
}
-
messageFlag = cli.StringFlag{
Name: "message",
Usage: "the file that contains the message to sign/verify",
}
)
-// Configure the app instance.
-func init() {
- app = utils.NewApp(gitCommit, "an Ethereum key manager")
- app.Commands = []cli.Command{
- commandGenerate,
- commandInspect,
- commandSignMessage,
- commandVerifyMessage,
- }
-}
-
func main() {
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)