diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-07 08:21:55 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-07 08:21:55 +0800 |
commit | 032ab665299d75bffc25260e8fa477ace19db06a (patch) | |
tree | 4877acc0e90b54036b194d5bb2f0ff28f4b87048 /cmd/ethereum/main.go | |
parent | 60d9611c2365512c9a3e1576e875c5755ea0c74b (diff) | |
download | go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar.gz go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar.bz2 go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar.lz go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar.xz go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.tar.zst go-tangerine-032ab665299d75bffc25260e8fa477ace19db06a.zip |
Added version flag
Diffstat (limited to 'cmd/ethereum/main.go')
-rw-r--r-- | cmd/ethereum/main.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 481914aea..3243cc7fb 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -52,6 +52,11 @@ func main() { // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line + if PrintVersion { + printVersion() + return + } + utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethereum, err := eth.New(ð.Config{ @@ -137,3 +142,13 @@ func main() { // this blocks the thread ethereum.WaitForShutdown() } + +func printVersion() { + fmt.Printf(`%v %v +PV=%d +GOOS=%s +GO=%s +GOPATH=%s +GOROOT=%s +`, ClientIdentifier, Version, eth.ProtocolVersion, runtime.GOOS, runtime.Version(), os.Getenv("GOPATH"), runtime.GOROOT()) +} |