diff options
author | Maran <maran.hidskes@gmail.com> | 2014-03-24 17:24:39 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-03-24 17:24:39 +0800 |
commit | 97786d03d57e1ca79e34ce5fd9aa172c61c3e665 (patch) | |
tree | 251a5e54305e5cedf568f2fb73dbff9302df4185 /ethutil/config.go | |
parent | 274d5cc91c45349ec8d7a1f5a20ef29896b38b2e (diff) | |
parent | 6a86c517c4f4b372cad0ae1d92e926a482eac5ba (diff) | |
download | go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar.gz go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar.bz2 go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar.lz go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar.xz go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.tar.zst go-tangerine-97786d03d57e1ca79e34ce5fd9aa172c61c3e665.zip |
Merge branch 'master' into miner
Diffstat (limited to 'ethutil/config.go')
-rw-r--r-- | ethutil/config.go | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ethutil/config.go b/ethutil/config.go index 5fdc8e1c5..54b066fb9 100644 --- a/ethutil/config.go +++ b/ethutil/config.go @@ -6,6 +6,7 @@ import ( "os" "os/user" "path" + "runtime" ) type LogType byte @@ -19,12 +20,13 @@ const ( type config struct { Db Database - Log *Logger - ExecPath string - Debug bool - Ver string - Pubkey []byte - Seed bool + Log *Logger + ExecPath string + Debug bool + Ver string + ClientString string + Pubkey []byte + Seed bool } var Config *config @@ -48,11 +50,16 @@ func ReadConfig(base string) *config { Config = &config{ExecPath: path, Debug: true, Ver: "0.3.1"} Config.Log = NewLogger(LogFile|LogStd, LogLevelDebug) + Config.SetClientString("/Ethereum(G)") } return Config } +func (c *config) SetClientString(str string) { + Config.ClientString = fmt.Sprintf("%s nv%s/%s", str, c.Ver, runtime.GOOS) +} + type LoggerType byte const ( |