зеркало из https://github.com/golang/vulndb.git
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>
This commit is contained in:
Родитель
2992f259b8
Коммит
b88680fc68
|
@ -43,8 +43,14 @@ type Cache interface {
|
|||
|
||||
type fsCache struct{}
|
||||
|
||||
// NewFsCache returns a fresh filesystem cache.
|
||||
// TODO: remove once the cache implementation reaches the go tooling repo.
|
||||
func NewFsCache() Cache {
|
||||
return &fsCache{}
|
||||
}
|
||||
|
||||
// should be cfg.GOMODCACHE when doing this inside the cmd/go/internal
|
||||
var cacheRoot = filepath.Join(build.Default.GOPATH, "/pkg/mod/cache/downlaod/vulndb")
|
||||
var cacheRoot = filepath.Join(build.Default.GOPATH, "/pkg/mod/cache/download/vulndb")
|
||||
|
||||
type cachedIndex struct {
|
||||
Retrieved time.Time
|
||||
|
|
Загрузка…
Ссылка в новой задаче