aboutsummaryrefslogtreecommitdiffhomepage
path: root/cache
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-03-24 10:11:16 +0100
committerBjørn Erik Pedersen <[email protected]>2019-03-24 16:14:51 +0100
commitb5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7 (patch)
treecf23180dc07698391cf47c2fe525755417729020 /cache
parent3011f36c27ecde309325e6c75ca377f4f87fa97a (diff)
downloadhugo-b5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7.tar.gz
hugo-b5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7.zip
all: Apply staticcheck recommendations
Diffstat (limited to 'cache')
-rw-r--r--cache/filecache/filecache.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache/filecache/filecache.go b/cache/filecache/filecache.go
index d4e3f5d6a..6ad417117 100644
--- a/cache/filecache/filecache.go
+++ b/cache/filecache/filecache.go
@@ -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