diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-08-23 22:51:21 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-08-24 13:45:03 +0100 |
commit | f8e3dea19012ccf05965d10255789eec33c2ebcf (patch) | |
tree | 8522ceada8bc7270648f29615b89550db910cb6c /vendor/github.com/gobuffalo/packr/packr.go | |
parent | 91f9bc722152146466523861162b85195f99875b (diff) |
Update deps
Diffstat (limited to 'vendor/github.com/gobuffalo/packr/packr.go')
-rw-r--r-- | vendor/github.com/gobuffalo/packr/packr.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/gobuffalo/packr/packr.go b/vendor/github.com/gobuffalo/packr/packr.go index d282994..6ccc6c1 100644 --- a/vendor/github.com/gobuffalo/packr/packr.go +++ b/vendor/github.com/gobuffalo/packr/packr.go @@ -4,6 +4,8 @@ import ( "bytes" "compress/gzip" "encoding/json" + "runtime" + "strings" "sync" ) @@ -53,3 +55,20 @@ func UnpackBytes(box string) { defer gil.Unlock() delete(data, box) } + +func osPaths(paths ...string) []string { + if runtime.GOOS == "windows" { + for i, path := range paths { + paths[i] = strings.Replace(path, "/", "\\", -1) + } + } + + return paths +} + +func osPath(path string) string { + if runtime.GOOS == "windows" { + return strings.Replace(path, "/", "\\", -1) + } + return path +} |