aboutsummaryrefslogtreecommitdiffhomepage
path: root/create
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-03-17 22:03:27 +0100
committerBjørn Erik Pedersen <[email protected]>2022-03-17 22:03:27 +0100
commitb80853de90b10171155b8f3fde47d64ec7bfa0dd (patch)
tree435d3dbf7a495a0c6ce64c9769e037179aa0d27b /create
parent423594e03a906ef4150f433666ff588b022c3c92 (diff)
downloadhugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.tar.gz
hugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.zip
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'create')
-rw-r--r--create/content.go2
-rw-r--r--create/content_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/create/content.go b/create/content.go
index ad375b8c5..9034ba299 100644
--- a/create/content.go
+++ b/create/content.go
@@ -346,7 +346,7 @@ func (b *contentBuilder) openInEditorIfConfigured(filename string) error {
editorExec := strings.Fields(editor)[0]
editorFlags := strings.Fields(editor)[1:]
- var args []interface{}
+ var args []any
for _, editorFlag := range editorFlags {
args = append(args, editorFlag)
}
diff --git a/create/content_test.go b/create/content_test.go
index a3692251f..b99a816b7 100644
--- a/create/content_test.go
+++ b/create/content_test.go
@@ -40,7 +40,7 @@ func TestNewContentFromFile(t *testing.T) {
name string
kind string
path string
- expected interface{}
+ expected any
}{
{"Post", "post", "post/sample-1.md", []string{`title = "Post Arch title"`, `test = "test1"`, "date = \"2015-01-12T19:20:04-07:00\""}},
{"Post org-mode", "post", "post/org-1.org", []string{`#+title: ORG-1`}},
@@ -368,7 +368,7 @@ Some text.
return nil
}
-func cContains(c *qt.C, v interface{}, matches ...string) {
+func cContains(c *qt.C, v any, matches ...string) {
for _, m := range matches {
c.Assert(v, qt.Contains, m)
}