aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-21 04:12:22 +0800
committerobscuren <geffobscura@gmail.com>2014-05-21 04:12:22 +0800
commitf4551a7e9f90dd10b22ccfcdaf59d1a6a35283cf (patch)
tree5e67f05a35186e1e7e94585acb007465568e2ff5
parent563c035eb57a0507979a84f3dd22411be2a4cad1 (diff)
downloadgo-tangerine-f4551a7e9f90dd10b22ccfcdaf59d1a6a35283cf.tar.gz
go-tangerine-f4551a7e9f90dd10b22ccfcdaf59d1a6a35283cf.tar.zst
go-tangerine-f4551a7e9f90dd10b22ccfcdaf59d1a6a35283cf.zip
Changed flag parsing
-rw-r--r--ethereum/config.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/ethereum/config.go b/ethereum/config.go
index 97e8687d8..f25f2fb66 100644
--- a/ethereum/config.go
+++ b/ethereum/config.go
@@ -2,6 +2,8 @@ package main
import (
"flag"
+ "fmt"
+ "os"
)
var StartMining bool
@@ -23,6 +25,11 @@ var StartJsConsole bool
var InputFile string
func Init() {
+ flag.Usage = func() {
+ fmt.Fprintf(os.Stderr, "%s [options] [filename]:\n", os.Args[0])
+ flag.PrintDefaults()
+ }
+
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
flag.BoolVar(&StartRpc, "r", false, "start rpc server")
@@ -38,7 +45,9 @@ func Init() {
flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
flag.IntVar(&MaxPeer, "x", 10, "maximum desired peers")
flag.BoolVar(&StartJsConsole, "js", false, "exp")
- flag.StringVar(&InputFile, "e", "", "Run javascript file")
+ //flag.StringVar(&InputFile, "e", "", "Run javascript file")
flag.Parse()
+
+ InputFile = flag.Arg(0)
}