diff --git a/pkg/blobcache/blobcache.go b/pkg/blobcache/blobcache.go index 1c88299f3..b67a83f33 100644 --- a/pkg/blobcache/blobcache.go +++ b/pkg/blobcache/blobcache.go @@ -139,7 +139,7 @@ func (b *BlobCache) Directory() string { return b.directory } -func (b *BlobCache) clearCache() error { +func (b *BlobCache) ClearCache() error { f, err := os.Open(b.directory) if err != nil { return errors.WithStack(err) diff --git a/pkg/blobcache/blobcache_test.go b/pkg/blobcache/blobcache_test.go index 18cbc664c..2393350c3 100644 --- a/pkg/blobcache/blobcache_test.go +++ b/pkg/blobcache/blobcache_test.go @@ -248,7 +248,7 @@ func TestBlobCache(t *testing.T) { if err != nil { t.Fatalf("unexpected error copying the image using the cache: %v", err) } - if err = cachedSrcRef.clearCache(); err != nil { + if err = cachedSrcRef.ClearCache(); err != nil { t.Fatalf("error clearing cache: %v", err) } }