diff options
author | Maran <maran.hidskes@gmail.com> | 2014-06-11 18:33:11 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-06-11 18:33:11 +0800 |
commit | e36badd744bc79c652deb3d45da1438982ec622a (patch) | |
tree | dbb2eb7e665067bb3a183311999862c1a65b1311 /ethereum/config.go | |
parent | 57e3b1b093a2533e26198e9198b85556bf362b27 (diff) | |
download | dexon-e36badd744bc79c652deb3d45da1438982ec622a.tar.gz dexon-e36badd744bc79c652deb3d45da1438982ec622a.tar.zst dexon-e36badd744bc79c652deb3d45da1438982ec622a.zip |
Reimplement -datadir flag. Implements #79
The config file is actually loaded from the folder that datadir points at
Diffstat (limited to 'ethereum/config.go')
-rw-r--r-- | ethereum/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethereum/config.go b/ethereum/config.go index 39dc11727..a80b47a8e 100644 --- a/ethereum/config.go +++ b/ethereum/config.go @@ -24,6 +24,8 @@ var NonInteractive bool var StartJsConsole bool var InputFile string +var Datadir string + func Init() { flag.Usage = func() { fmt.Fprintf(os.Stderr, "%s [options] [filename]:\n", os.Args[0]) @@ -46,6 +48,8 @@ func Init() { flag.StringVar(&LogFile, "logfile", "", "log file (defaults to standard output)") flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)") + flag.StringVar(&Datadir, "datadir", ".ethereum", "specifies the datadir to use. Takes precedence over config file.") + flag.Parse() InputFile = flag.Arg(0) |