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 /tpl/images | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'tpl/images')
-rw-r--r-- | tpl/images/images.go | 4 | ||||
-rw-r--r-- | tpl/images/images_test.go | 4 | ||||
-rw-r--r-- | tpl/images/init.go | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tpl/images/images.go b/tpl/images/images.go index 1d12aea72..aae8b3c2b 100644 --- a/tpl/images/images.go +++ b/tpl/images/images.go @@ -55,7 +55,7 @@ type Namespace struct { // Config returns the image.Config for the specified path relative to the // working directory. -func (ns *Namespace) Config(path interface{}) (image.Config, error) { +func (ns *Namespace) Config(path any) (image.Config, error) { filename, err := cast.ToStringE(path) if err != nil { return image.Config{}, err @@ -92,7 +92,7 @@ func (ns *Namespace) Config(path interface{}) (image.Config, error) { return config, nil } -func (ns *Namespace) Filter(args ...interface{}) (resource.Image, error) { +func (ns *Namespace) Filter(args ...any) (resource.Image, error) { if len(args) < 2 { return nil, errors.New("must provide an image and one or more filters") } diff --git a/tpl/images/images_test.go b/tpl/images/images_test.go index 2a2b79478..c142801b7 100644 --- a/tpl/images/images_test.go +++ b/tpl/images/images_test.go @@ -32,9 +32,9 @@ import ( type tstNoStringer struct{} var configTests = []struct { - path interface{} + path any input []byte - expect interface{} + expect any }{ { path: "a.png", diff --git a/tpl/images/init.go b/tpl/images/init.go index f3233f6e9..d9b9af4e7 100644 --- a/tpl/images/init.go +++ b/tpl/images/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.Config, |