Skip to content

Commit 120c80e

Browse files
committed
refactor: move hashResults type
1 parent c94dcfb commit 120c80e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/cache/cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const (
2929

3030
var ErrMissing = errors.New("missing data")
3131

32+
type hashResults map[HashMode]string
33+
3234
// Cache is a per-package data cache.
3335
// A cached data is invalidated when package,
3436
// or it's dependencies change.
@@ -130,7 +132,6 @@ func (c *Cache) pkgActionID(pkg *packages.Package, mode HashMode) (cache.ActionI
130132
// The hash is based on all Go files that make up the package,
131133
// as well as the hashes of imported packages.
132134
func (c *Cache) packageHash(pkg *packages.Package, mode HashMode) (string, error) {
133-
type hashResults map[HashMode]string
134135
hashResI, ok := c.pkgHashes.Load(pkg)
135136
if ok {
136137
hashRes := hashResI.(hashResults)

0 commit comments

Comments
 (0)