aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/resource_cache.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <[email protected]>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /resources/resource_cache.go
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'resources/resource_cache.go')
-rw-r--r--resources/resource_cache.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/resources/resource_cache.go b/resources/resource_cache.go
index 6c4ba951b..f498bb0c0 100644
--- a/resources/resource_cache.go
+++ b/resources/resource_cache.go
@@ -69,8 +69,8 @@ func resourceKeyPartition(filename string) string {
// Commonly used aliases and directory names used for some types.
var extAliasKeywords = map[string][]string{
- "sass": []string{"scss"},
- "scss": []string{"sass"},
+ "sass": {"scss"},
+ "scss": {"sass"},
}
// ResourceKeyPartitions resolves a ordered slice of partitions that is
@@ -201,7 +201,6 @@ func (c *ResourceCache) getOrCreate(key string, f func() (interface{}, error)) (
c.set(key, r)
return r, nil
-
}
func (c *ResourceCache) getFilenames(key string) (string, string) {
@@ -230,7 +229,6 @@ func (c *ResourceCache) getFromFile(key string) (filecache.ItemInfo, io.ReadClos
fi, rc, _ := c.fileCache.Get(filenameContent)
return fi, rc, meta, rc != nil
-
}
// writeMeta writes the metadata to file and returns a writer for the content part.
@@ -254,7 +252,6 @@ func (c *ResourceCache) writeMeta(key string, meta transformedResourceMetadata)
fi, fc, err := c.fileCache.WriteCloser(filenameContent)
return fi, fc, err
-
}
func (c *ResourceCache) set(key string, r interface{}) {
@@ -294,7 +291,6 @@ func (c *ResourceCache) DeletePartitions(partitions ...string) {
delete(c.cache, k)
}
}
-
}
func (c *ResourceCache) DeleteMatches(re *regexp.Regexp) {
@@ -305,7 +301,5 @@ func (c *ResourceCache) DeleteMatches(re *regexp.Regexp) {
if re.MatchString(k) {
delete(c.cache, k)
}
-
}
-
}