aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-07-14 21:24:38 +0800
committerMaran <maran.hidskes@gmail.com>2014-07-14 21:24:38 +0800
commit8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (patch)
tree9fa0071f2a1f8d20f7aeae187ab49cae94f72e93 /ethutil
parent6426f3635eddaa1477e643886fd3c0eaf1fa6158 (diff)
downloaddexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar.gz
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar.bz2
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar.lz
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar.xz
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.tar.zst
dexon-8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9.zip
Add windows helper functions
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)