From: Diogo Franco (Kovensky) Date: Tue, 16 Jul 2013 22:53:13 +0000 (-0300) Subject: Export Stringify X-Git-Tag: v0.0.1~3 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=4ba560f44343d34e638a11b6f9609f9ae3e5efe0;p=go-fscache.git Export Stringify --- diff --git a/cachekey.go b/cachekey.go index 37f88b9..8d8725d 100755 --- a/cachekey.go +++ b/cachekey.go @@ -26,7 +26,7 @@ type CacheKey interface{} // It's a superset of the "bad characters" on other OSes, so this works. var badPath = regexp.MustCompile(`[\\/:\*\?\"<>\|]`) -func stringify(stuff ...CacheKey) []string { +func Stringify(stuff ...CacheKey) []string { ret := make([]string, len(stuff)) for i := range stuff { s := fmt.Sprint(stuff[i]) @@ -41,7 +41,7 @@ func stringify(stuff ...CacheKey) []string { // This also means that cache keys that are file-backed // cannot have subkeys. func (cd *CacheDir) cachePath(key ...CacheKey) string { - parts := append([]string{cd.GetCacheDir()}, stringify(key...)...) + parts := append([]string{cd.GetCacheDir()}, Stringify(key...)...) p := filepath.Join(filterDots(parts...)...) return p }