Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
This is broken on all PRs
  • Loading branch information
julienduchesne committed Dec 11, 2024
1 parent c24c69b commit 8924b10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ func New() *Cache {
}

// Put adds or replaces a document in the cache.
func (c *Cache) Put(new *Document) error {
func (c *Cache) Put(doc *Document) error {
c.mu.Lock()
defer c.mu.Unlock()

uri := new.Item.URI
uri := doc.Item.URI
if old, ok := c.docs[uri]; ok {
if old.Item.Version > new.Item.Version {
if old.Item.Version > doc.Item.Version {
return errors.New("newer version of the document is already in the cache")
}
}
c.docs[uri] = new
c.docs[uri] = doc

// Invalidate the TopLevelObject cache
// We can't easily invalidate the cache for a single file (hard to figure out where the import actually leads),
Expand Down

0 comments on commit 8924b10

Please sign in to comment.