Skip to content

Commit 06749bd

Browse files
committed
use path/filepath to join the cache path. this will use the path separator that's native to the OS.
1 parent ab0dc8d commit 06749bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cache/cache.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import (
55
"encoding/json"
66
"fmt"
77
"os"
8-
"path"
98
"strings"
9+
"path/filepath"
1010
)
1111

12-
var cachePath = path.Join(os.TempDir(), "pullkee_cache", "cache.json")
12+
var cachePath = filepath.Join(os.TempDir(), "pullkee_cache", "cache.json")
1313

1414
// Cache is an interface for a Get/Set caching struct
1515
type Cache interface {
@@ -60,5 +60,5 @@ func (c FSCache) Get(key string, x interface{}) (bool, error) {
6060
}
6161

6262
func (c FSCache) filePath(key string) string {
63-
return path.Join(c.CachePath, fmt.Sprintf("%s.json", key))
63+
return filepath.Join(c.CachePath, fmt.Sprintf("%s.json", key))
6464
}

0 commit comments

Comments
 (0)