]> git.lizzy.rs Git - go-fscache.git/commitdiff
Export Stringify
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 22:53:13 +0000 (19:53 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Tue, 16 Jul 2013 22:53:13 +0000 (19:53 -0300)
cachekey.go

index 37f88b93039ede47cf6a60806a36a1483a70dbd7..8d8725d811dd700cd8538bece62edaa6ea67fcff 100755 (executable)
@@ -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
 }