aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/postpub
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/postpub
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'resources/postpub')
-rw-r--r--resources/postpub/fields.go2
-rw-r--r--resources/postpub/fields_test.go1
-rw-r--r--resources/postpub/postpub.go1
3 files changed, 1 insertions, 3 deletions
diff --git a/resources/postpub/fields.go b/resources/postpub/fields.go
index f1cfe6092..ed3491438 100644
--- a/resources/postpub/fields.go
+++ b/resources/postpub/fields.go
@@ -53,7 +53,7 @@ func structToMap(s interface{}) map[string]interface{} {
// insert placeholder for the templates. Do it very shallow for now.
func insertFieldPlaceholders(root string, m map[string]interface{}, createPlaceholder func(s string) string) {
- for k, _ := range m {
+ for k := range m {
m[k] = createPlaceholder(root + "." + k)
}
}
diff --git a/resources/postpub/fields_test.go b/resources/postpub/fields_test.go
index d67c7c9a9..10a68ac5a 100644
--- a/resources/postpub/fields_test.go
+++ b/resources/postpub/fields_test.go
@@ -42,5 +42,4 @@ func TestCreatePlaceholders(t *testing.T) {
"SubType": "pre_foo.SubType_post",
"Suffixes": "pre_foo.Suffixes_post",
})
-
}
diff --git a/resources/postpub/postpub.go b/resources/postpub/postpub.go
index 3a1dd2f85..85b4221fd 100644
--- a/resources/postpub/postpub.go
+++ b/resources/postpub/postpub.go
@@ -108,7 +108,6 @@ func (r *PostPublishResource) GetFieldString(pattern string) (string, bool) {
default:
panic(fmt.Sprintf("unknown field accessor %q", fieldAccessor))
}
-
}
func (r *PostPublishResource) fieldToString(receiver interface{}, path string) string {