mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-10 19:54:08 +02:00
all: Apply staticcheck recommendations
This commit is contained in:
2
cache/filecache/filecache.go
vendored
2
cache/filecache/filecache.go
vendored
@@ -274,7 +274,7 @@ func (c *Cache) isExpired(modTime time.Time) bool {
|
||||
if c.maxAge < 0 {
|
||||
return false
|
||||
}
|
||||
return c.maxAge == 0 || time.Now().Sub(modTime) > c.maxAge
|
||||
return c.maxAge == 0 || time.Since(modTime) > c.maxAge
|
||||
}
|
||||
|
||||
// For testing
|
||||
|
Reference in New Issue
Block a user