diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-15 01:50:06 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-15 01:50:06 +0800 |
commit | 3d5db7288f134fef7e51b25776007705f6663654 (patch) | |
tree | edda6e8fd23584327473058411df9cd2c53241f4 /ethutil/common.go | |
parent | dc11b5c55e2888a7a3dac51fedc3864d112136ce (diff) | |
parent | 8845fb7eae3e51fd3e55c47c377bf1a9e0cfe2a9 (diff) | |
download | go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.gz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.bz2 go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.lz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.xz go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.tar.zst go-tangerine-3d5db7288f134fef7e51b25776007705f6663654.zip |
merge upstream
Diffstat (limited to 'ethutil/common.go')
-rw-r--r-- | ethutil/common.go | 12 |
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) |