diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-12 21:50:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-12 21:50:48 +0800 |
commit | 3b3843e158d9ddbe76dcfa1e78977f0bd99a9142 (patch) | |
tree | 420e7d43f232cd4ae7199ecb4931b9e3d85cf77a /ethutil | |
parent | ef6706696c39c77b20dc5127da8c62e89de39cf7 (diff) | |
parent | 2a0e5888fdd357553e31bcee4264d9db6f486f39 (diff) | |
download | dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar.gz dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar.bz2 dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar.lz dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar.xz dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.tar.zst dexon-3b3843e158d9ddbe76dcfa1e78977f0bd99a9142.zip |
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/common.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go index 9b66763b8..3ade7fd16 100644 --- a/ethutil/common.go +++ b/ethutil/common.go @@ -13,6 +13,13 @@ import ( "github.com/kardianos/osext" ) +// MakeName creates a node name that follows the ethereum convention +// for such names. It adds the operation system name and Go runtime version +// the name. +func MakeName(name, version string) string { + return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version()) +} + func DefaultAssetPath() string { var assetPath string pwd, _ := os.Getwd() |