diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 03:29:07 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-12 03:29:07 +0800 |
commit | 485e37e889d5dd2c0461d686b122e1beb6089c16 (patch) | |
tree | f608f1e146c0e1d5da3f741741dce929d2757a0a /ethutil | |
parent | 587f748d929e0c76d9b43e74d70cafb8f614fad0 (diff) | |
download | go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar.gz go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar.bz2 go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar.lz go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar.xz go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.tar.zst go-tangerine-485e37e889d5dd2c0461d686b122e1beb6089c16.zip |
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() |