This commit is contained in:
Stash Dev
2019-02-14 15:42:52 -08:00
parent 1d00b2b36f
commit b488c1ed7d
111 changed files with 141 additions and 141 deletions

14
pkg/utils/windows.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
import (
"runtime"
"strings"
)
// FixWindowsPath replaces \ with / in the given path because sometimes the \ isn't recognized as valid on windows
func FixWindowsPath(str string) string {
if runtime.GOOS == "windows" {
return strings.Replace(str, "\\", "/", -1)
}
return str
}