diff --git a/s3-config-validator/src/go.mod b/s3-config-validator/src/go.mod index 55da5b7ef..58211d84a 100644 --- a/s3-config-validator/src/go.mod +++ b/s3-config-validator/src/go.mod @@ -1,13 +1,14 @@ module github.com/cloudfoundry-incubator/bosh-backup-and-restore/s3-config-validator/src go 1.22.0 +toolchain go1.23.2 require ( github.com/aws/aws-sdk-go-v2 v1.32.2 github.com/aws/aws-sdk-go-v2/credentials v1.17.41 github.com/aws/aws-sdk-go-v2/service/s3 v1.65.3 github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 - github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 + github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 github.com/onsi/ginkgo/v2 v2.20.2 github.com/onsi/gomega v1.34.2 ) diff --git a/s3-config-validator/src/go.sum b/s3-config-validator/src/go.sum index 06fc62496..32b015e8d 100644 --- a/s3-config-validator/src/go.sum +++ b/s3-config-validator/src/go.sum @@ -41,8 +41,8 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 h1:ERhc+PJKEyqWQnKu7/K0frSVGFihYYImqNdqP5r0cN0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0/go.mod h1:tU2wQdIyJ7fib/YXxFR0dgLlFz3yl4p275UfUKmDFjk= +github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 h1:9WsegDYiSKtZXru+NcOB4z7iqb00n4atjmQlyy5TRXI= +github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0/go.mod h1:TeVdzh+5QB5IpWDJAU/uviXA6kOg9yXzLrrjeLKJXqY= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= diff --git a/s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/loader.go b/s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/loader.go index 4a8695b1e..4ffb87395 100644 --- a/s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/loader.go +++ b/s3-config-validator/src/vendor/github.com/maxbrunsfeld/counterfeiter/v6/generator/loader.go @@ -130,14 +130,10 @@ func (f *Fake) addImportsFor(typ types.Type) { f.addImportsFor(t.Elem()) case *types.Chan: f.addImportsFor(t.Elem()) + case *types.Alias: + f.addImportsForNamedType(t) case *types.Named: - if t.Obj() != nil && t.Obj().Pkg() != nil { - typeArgs := t.TypeArgs() - for i := 0; i < typeArgs.Len(); i++ { - f.addImportsFor(typeArgs.At(i)) - } - f.Imports.Add(t.Obj().Pkg().Name(), t.Obj().Pkg().Path()) - } + f.addImportsForNamedType(t) case *types.Slice: f.addImportsFor(t.Elem()) case *types.Array: @@ -154,3 +150,16 @@ func (f *Fake) addImportsFor(typ types.Type) { log.Printf("!!! WARNING: Missing case for type %s\n", reflect.TypeOf(typ).String()) } } + +func (f *Fake) addImportsForNamedType(t interface { + Obj() *types.TypeName + TypeArgs() *types.TypeList +}) { + if t.Obj() != nil && t.Obj().Pkg() != nil { + typeArgs := t.TypeArgs() + for i := 0; i < typeArgs.Len(); i++ { + f.addImportsFor(typeArgs.At(i)) + } + f.Imports.Add(t.Obj().Pkg().Name(), t.Obj().Pkg().Path()) + } +} diff --git a/s3-config-validator/src/vendor/modules.txt b/s3-config-validator/src/vendor/modules.txt index c51324e41..b57682512 100644 --- a/s3-config-validator/src/vendor/modules.txt +++ b/s3-config-validator/src/vendor/modules.txt @@ -118,8 +118,8 @@ github.com/google/go-cmp/cmp/internal/value github.com/google/pprof/profile # github.com/kr/pretty v0.2.1 ## explicit; go 1.12 -# github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 -## explicit; go 1.22.0 +# github.com/maxbrunsfeld/counterfeiter/v6 v6.10.0 +## explicit; go 1.23 github.com/maxbrunsfeld/counterfeiter/v6 github.com/maxbrunsfeld/counterfeiter/v6/arguments github.com/maxbrunsfeld/counterfeiter/v6/command