diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-18 00:03:27 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-18 00:03:27 +0300 |
commit | b80853de90b10171155b8f3fde47d64ec7bfa0dd (patch) | |
tree | 435d3dbf7a495a0c6ce64c9769e037179aa0d27b /tpl/fmt | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'tpl/fmt')
-rw-r--r-- | tpl/fmt/fmt.go | 12 | ||||
-rw-r--r-- | tpl/fmt/init.go | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go index cb8aa3cf2..3882d4704 100644 --- a/tpl/fmt/fmt.go +++ b/tpl/fmt/fmt.go @@ -48,23 +48,23 @@ type Namespace struct { } // Print returns string representation of the passed arguments. -func (ns *Namespace) Print(a ...interface{}) string { +func (ns *Namespace) Print(a ...any) string { return _fmt.Sprint(a...) } // Printf returns a formatted string representation of the passed arguments. -func (ns *Namespace) Printf(format string, a ...interface{}) string { +func (ns *Namespace) Printf(format string, a ...any) string { return _fmt.Sprintf(format, a...) } // Println returns string representation of the passed arguments ending with a newline. -func (ns *Namespace) Println(a ...interface{}) string { +func (ns *Namespace) Println(a ...any) string { return _fmt.Sprintln(a...) } // Errorf formats according to a format specifier and logs an ERROR. // It returns an empty string. -func (ns *Namespace) Errorf(format string, a ...interface{}) string { +func (ns *Namespace) Errorf(format string, a ...any) string { ns.distinctLogger.Errorf(format, a...) return "" } @@ -72,14 +72,14 @@ func (ns *Namespace) Errorf(format string, a ...interface{}) string { // Erroridf formats according to a format specifier and logs an ERROR and // an information text that the error with the given ID can be suppressed in config. // It returns an empty string. -func (ns *Namespace) Erroridf(id, format string, a ...interface{}) string { +func (ns *Namespace) Erroridf(id, format string, a ...any) string { ns.distinctLogger.Errorsf(id, format, a...) return "" } // Warnf formats according to a format specifier and logs a WARNING. // It returns an empty string. -func (ns *Namespace) Warnf(format string, a ...interface{}) string { +func (ns *Namespace) Warnf(format string, a ...any) string { ns.distinctLogger.Warnf(format, a...) return "" } diff --git a/tpl/fmt/init.go b/tpl/fmt/init.go index c02f985be..b0683f061 100644 --- a/tpl/fmt/init.go +++ b/tpl/fmt/init.go @@ -26,7 +26,7 @@ func init() { ns := &internal.TemplateFuncsNamespace{ Name: name, - Context: func(args ...interface{}) (interface{}, error) { return ctx, nil }, + Context: func(args ...any) (any, error) { return ctx, nil }, } ns.AddMethodMapping(ctx.Print, |