summaryrefslogtreecommitdiffstats
path: root/tpl/openapi/openapi3
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-17 22:03:27 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-17 22:03:27 +0100
commitb80853de90b10171155b8f3fde47d64ec7bfa0dd (patch)
tree435d3dbf7a495a0c6ce64c9769e037179aa0d27b /tpl/openapi/openapi3
parent423594e03a906ef4150f433666ff588b022c3c92 (diff)
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'tpl/openapi/openapi3')
-rw-r--r--tpl/openapi/openapi3/init.go2
-rw-r--r--tpl/openapi/openapi3/openapi3.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tpl/openapi/openapi3/init.go b/tpl/openapi/openapi3/init.go
index a0084d503..8597e3294 100644
--- a/tpl/openapi/openapi3/init.go
+++ b/tpl/openapi/openapi3/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.Unmarshal,
diff --git a/tpl/openapi/openapi3/openapi3.go b/tpl/openapi/openapi3/openapi3.go
index b4c2e64fd..276673889 100644
--- a/tpl/openapi/openapi3/openapi3.go
+++ b/tpl/openapi/openapi3/openapi3.go
@@ -54,7 +54,7 @@ func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.T, er
return nil, errors.New("no Key set in Resource")
}
- v, err := ns.cache.GetOrCreate(key, func() (interface{}, error) {
+ v, err := ns.cache.GetOrCreate(key, func() (any, error) {
f := metadecoders.FormatFromMediaType(r.MediaType())
if f == "" {
return nil, errors.Errorf("MIME %q not supported", r.MediaType())