aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gobuffalo/packr/packr.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gobuffalo/packr/packr.go')
-rw-r--r--vendor/github.com/gobuffalo/packr/packr.go19
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
+}