aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser/pageparser
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 /parser/pageparser
parent423594e03a906ef4150f433666ff588b022c3c92 (diff)
downloadhugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.tar.gz
hugo-b80853de90b10171155b8f3fde47d64ec7bfa0dd.zip
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'parser/pageparser')
-rw-r--r--parser/pageparser/item.go2
-rw-r--r--parser/pageparser/pagelexer.go2
-rw-r--r--parser/pageparser/pageparser.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/parser/pageparser/item.go b/parser/pageparser/item.go
index 9224fba94..f23341ea8 100644
--- a/parser/pageparser/item.go
+++ b/parser/pageparser/item.go
@@ -33,7 +33,7 @@ func (i Item) ValStr() string {
return string(i.Val)
}
-func (i Item) ValTyped() interface{} {
+func (i Item) ValTyped() any {
str := i.ValStr()
if i.isString {
// A quoted value that is a string even if it looks like a number etc.
diff --git a/parser/pageparser/pagelexer.go b/parser/pageparser/pagelexer.go
index 266fb50f5..20965ac0e 100644
--- a/parser/pageparser/pagelexer.go
+++ b/parser/pageparser/pagelexer.go
@@ -176,7 +176,7 @@ func (l *pageLexer) ignore() {
var lf = []byte("\n")
// nil terminates the parser
-func (l *pageLexer) errorf(format string, args ...interface{}) stateFunc {
+func (l *pageLexer) errorf(format string, args ...any) stateFunc {
l.items = append(l.items, Item{tError, l.start, []byte(fmt.Sprintf(format, args...)), true})
return nil
}
diff --git a/parser/pageparser/pageparser.go b/parser/pageparser/pageparser.go
index 7bfcfd698..3338e063e 100644
--- a/parser/pageparser/pageparser.go
+++ b/parser/pageparser/pageparser.go
@@ -42,7 +42,7 @@ func Parse(r io.Reader, cfg Config) (Result, error) {
type ContentFrontMatter struct {
Content []byte
- FrontMatter map[string]interface{}
+ FrontMatter map[string]any
FrontMatterFormat metadecoders.Format
}