aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-15 06:25:57 +0800
committerobscuren <geffobscura@gmail.com>2014-07-15 06:25:57 +0800
commit5ec62a51537dec6cd299dfc0ff1fbd0847338ff8 (patch)
tree27843db497bb7709abf1ecd0bdfe800c096dff3a /ethutil
parent2784e256f1c5f8112486e9037c9b00e628e5aa10 (diff)
parent8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (diff)
downloadgo-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.gz
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.bz2
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.lz
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.xz
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.tar.zst
go-tangerine-5ec62a51537dec6cd299dfc0ff1fbd0847338ff8.zip
Merge branch 'develop' of github.com-obscure:ethereum/eth-go into develop
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/common.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index 6d88a1ed2..2fd031a20 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -3,8 +3,20 @@ package ethutil
import (
"fmt"
"math/big"
+ "runtime"
)
+func IsWindows() bool {
+ return runtime.GOOS == "windows"
+}
+
+func WindonizePath(path string) string {
+ if string(path[0]) == "/" && IsWindows() {
+ path = path[1:]
+ }
+ return path
+}
+
// The different number of units
var (
Douglas = BigPow(10, 42)