From 485e37e889d5dd2c0461d686b122e1beb6089c16 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 11 Mar 2015 14:29:07 -0500 Subject: Move MakeName to ethutil --- ethutil/common.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ethutil/common.go') 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() -- cgit