aboutsummaryrefslogtreecommitdiffstats
path: root/common/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/path.go')
-rw-r--r--common/path.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/path.go b/common/path.go
index 8b95a2be6..d38b1fd5b 100644
--- a/common/path.go
+++ b/common/path.go
@@ -1,6 +1,7 @@
package common
import (
+ "fmt"
"io/ioutil"
"os"
"os/user"
@@ -12,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 ExpandHomePath(p string) (path string) {
path = p