diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-12 21:45:31 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-03-12 21:45:31 +0800 |
commit | 2a0e5888fdd357553e31bcee4264d9db6f486f39 (patch) | |
tree | a1d8e5463876380174f918674a03a88e8658bc0a /ethutil | |
parent | 31a95151c9fb95c8527e419347556f455aebd1cb (diff) | |
parent | 485e37e889d5dd2c0461d686b122e1beb6089c16 (diff) | |
download | go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar.gz go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar.bz2 go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar.lz go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar.xz go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.tar.zst go-tangerine-2a0e5888fdd357553e31bcee4264d9db6f486f39.zip |
Merge pull request #460 from tgerring/ethutil
Move MakeName to ethutil
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() |