diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
commit | b80853de90b10171155b8f3fde47d64ec7bfa0dd (patch) | |
tree | 435d3dbf7a495a0c6ce64c9769e037179aa0d27b /hugolib/page__ref.go | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'hugolib/page__ref.go')
-rw-r--r-- | hugolib/page__ref.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hugolib/page__ref.go b/hugolib/page__ref.go index f2b819c57..242317973 100644 --- a/hugolib/page__ref.go +++ b/hugolib/page__ref.go @@ -30,23 +30,23 @@ type pageRef struct { p *pageState } -func (p pageRef) Ref(argsm map[string]interface{}) (string, error) { +func (p pageRef) Ref(argsm map[string]any) (string, error) { return p.ref(argsm, p.p) } -func (p pageRef) RefFrom(argsm map[string]interface{}, source interface{}) (string, error) { +func (p pageRef) RefFrom(argsm map[string]any, source any) (string, error) { return p.ref(argsm, source) } -func (p pageRef) RelRef(argsm map[string]interface{}) (string, error) { +func (p pageRef) RelRef(argsm map[string]any) (string, error) { return p.relRef(argsm, p.p) } -func (p pageRef) RelRefFrom(argsm map[string]interface{}, source interface{}) (string, error) { +func (p pageRef) RelRefFrom(argsm map[string]any, source any) (string, error) { return p.relRef(argsm, source) } -func (p pageRef) decodeRefArgs(args map[string]interface{}) (refArgs, *Site, error) { +func (p pageRef) decodeRefArgs(args map[string]any) (refArgs, *Site, error) { var ra refArgs err := mapstructure.WeakDecode(args, &ra) if err != nil { @@ -74,7 +74,7 @@ func (p pageRef) decodeRefArgs(args map[string]interface{}) (refArgs, *Site, err return ra, s, nil } -func (p pageRef) ref(argsm map[string]interface{}, source interface{}) (string, error) { +func (p pageRef) ref(argsm map[string]any, source any) (string, error) { args, s, err := p.decodeRefArgs(argsm) if err != nil { return "", errors.Wrap(err, "invalid arguments to Ref") @@ -91,7 +91,7 @@ func (p pageRef) ref(argsm map[string]interface{}, source interface{}) (string, return s.refLink(args.Path, source, false, args.OutputFormat) } -func (p pageRef) relRef(argsm map[string]interface{}, source interface{}) (string, error) { +func (p pageRef) relRef(argsm map[string]any, source any) (string, error) { args, s, err := p.decodeRefArgs(argsm) if err != nil { return "", errors.Wrap(err, "invalid arguments to Ref") |