aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/config.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-06-11 18:33:11 +0800
committerMaran <maran.hidskes@gmail.com>2014-06-11 18:33:11 +0800
commite36badd744bc79c652deb3d45da1438982ec622a (patch)
treedbb2eb7e665067bb3a183311999862c1a65b1311 /ethereal/config.go
parent57e3b1b093a2533e26198e9198b85556bf362b27 (diff)
downloadgo-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar.gz
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar.bz2
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar.lz
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar.xz
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.tar.zst
go-tangerine-e36badd744bc79c652deb3d45da1438982ec622a.zip
Reimplement -datadir flag. Implements #79
The config file is actually loaded from the folder that datadir points at
Diffstat (limited to 'ethereal/config.go')
-rw-r--r--ethereal/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethereal/config.go b/ethereal/config.go
index 6a42663e7..2315d1435 100644
--- a/ethereal/config.go
+++ b/ethereal/config.go
@@ -20,6 +20,8 @@ var ImportKey string
var ExportKey bool
var AssetPath string
+var Datadir string
+
func Init() {
flag.StringVar(&Identifier, "id", "", "Custom client identifier")
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
@@ -35,5 +37,7 @@ func Init() {
flag.BoolVar(&ExportKey, "export", false, "export private key")
flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
+ flag.StringVar(&Datadir, "datadir", ".ethereal", "specifies the datadir to use. Takes precedence over config file.")
+
flag.Parse()
}