diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /cache/filecache/filecache.go | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) | |
download | hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'cache/filecache/filecache.go')
-rw-r--r-- | cache/filecache/filecache.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/cache/filecache/filecache.go b/cache/filecache/filecache.go index 37870dd5f..c586f9a51 100644 --- a/cache/filecache/filecache.go +++ b/cache/filecache/filecache.go @@ -158,7 +158,6 @@ func (c *Cache) ReadOrCreate(id string, err = create(info, f) return - } // GetOrCreate tries to get the file with the given id from cache. If not found or expired, create will @@ -220,7 +219,6 @@ func (c *Cache) GetOrCreateBytes(id string, create func() ([]byte, error)) (Item return info, nil, err } return info, b, nil - } // GetBytes gets the file content with the given id from the cahce, nil if none found. @@ -276,7 +274,6 @@ func (c *Cache) getOrRemove(id string) hugio.ReadSeekCloser { } f, err := c.Fs.Open(id) - if err != nil { return nil } @@ -299,7 +296,6 @@ func (c *Cache) getString(id string) string { defer c.nlocker.Unlock(id) f, err := c.Fs.Open(id) - if err != nil { return "" } @@ -307,7 +303,6 @@ func (c *Cache) getString(id string) string { b, _ := ioutil.ReadAll(f) return string(b) - } // Caches is a named set of caches. |