Skip to content

Commit b88680f

Browse files
zpavlinovicFiloSottile
authored andcommitted
client: allows fsCache to be publicly accessable for go audit.
fsCache is the only cache implementation available. In order to be integrated in goaudit, it needs to be made publicly accessable as go audit and cache do not live in the same repo. fsCache will be made private again once go audit and client live in the same space in the near future. Change-Id: I4dd86f407ce83f2162e8a1921f86643bbefdd456 Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1033548 Reviewed-by: Roland Shoemaker <bracewell@google.com>
1 parent 2992f25 commit b88680f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

client/cache.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ type Cache interface {
4343

4444
type fsCache struct{}
4545

46+
// NewFsCache returns a fresh filesystem cache.
47+
// TODO: remove once the cache implementation reaches the go tooling repo.
48+
func NewFsCache() Cache {
49+
return &fsCache{}
50+
}
51+
4652
// should be cfg.GOMODCACHE when doing this inside the cmd/go/internal
47-
var cacheRoot = filepath.Join(build.Default.GOPATH, "/pkg/mod/cache/downlaod/vulndb")
53+
var cacheRoot = filepath.Join(build.Default.GOPATH, "/pkg/mod/cache/download/vulndb")
4854

4955
type cachedIndex struct {
5056
Retrieved time.Time

0 commit comments

Comments
 (0)