1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

all: gofmt -w -r 'interface{} -> any' .

Updates #9687
This commit is contained in:
Bjørn Erik Pedersen
2022-03-17 22:03:27 +01:00
parent 423594e03a
commit b80853de90
342 changed files with 2118 additions and 2102 deletions

View File

@ -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)
}

View File

@ -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)
}