From 17435ae3b660583597068a4024db61b4c6d519e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 20:01:15 +0000 Subject: [PATCH] Bump github.com/tsenart/vegeta/v12 from 12.11.0 to 12.11.1 (#2848) * Bump github.com/tsenart/vegeta/v12 from 12.11.0 to 12.11.1 Bumps [github.com/tsenart/vegeta/v12](https://github.com/tsenart/vegeta) from 12.11.0 to 12.11.1. - [Release notes](https://github.com/tsenart/vegeta/releases) - [Changelog](https://github.com/tsenart/vegeta/blob/master/CHANGELOG) - [Commits](https://github.com/tsenart/vegeta/compare/v12.11.0...v12.11.1) --- updated-dependencies: - dependency-name: github.com/tsenart/vegeta/v12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Run ./hack/update-codegen.sh --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 +++--- vendor/github.com/tsenart/vegeta/v12/lib/attack.go | 10 +++++----- vendor/github.com/tsenart/vegeta/v12/lib/targets.go | 4 ++-- vendor/modules.txt | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index aa21c97306..58e0b69996 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 github.com/spf13/pflag v1.0.5 - github.com/tsenart/vegeta/v12 v12.11.0 + github.com/tsenart/vegeta/v12 v12.11.1 go.opencensus.io v0.24.0 go.uber.org/automaxprocs v1.5.3 go.uber.org/zap v1.26.0 diff --git a/go.sum b/go.sum index df6936f4a2..b8a721f691 100644 --- a/go.sum +++ b/go.sum @@ -361,8 +361,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/tsenart/vegeta/v12 v12.11.0 h1:f6V4xW6KMc5BLAWPzEu9l6Vclif44AW4IxPC7TSZwDM= -github.com/tsenart/vegeta/v12 v12.11.0/go.mod h1:YzY1ucY/V7QyR5ZVRqSMUkyuwgyqtXWQuEa2lVPzUeU= +github.com/tsenart/vegeta/v12 v12.11.1 h1:Rbwe7Zxr7sJ+BDTReemeQalYPvKiSV+O7nwmUs20B3E= +github.com/tsenart/vegeta/v12 v12.11.1/go.mod h1:swiFmrgpqj2llHURgHYFRFN0tfrIrlnspg01HjwOnSQ= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -755,7 +755,7 @@ k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPB k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263 h1:e6r9J1YopzSh6tDCpyKhVBfRUlZ2r0KRo9wupRjdRF4= knative.dev/hack v0.0.0-20230926181829-f2f9b6f91263/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/github.com/tsenart/vegeta/v12/lib/attack.go b/vendor/github.com/tsenart/vegeta/v12/lib/attack.go index caebba6f83..80df5e1a9b 100644 --- a/vendor/github.com/tsenart/vegeta/v12/lib/attack.go +++ b/vendor/github.com/tsenart/vegeta/v12/lib/attack.go @@ -5,7 +5,6 @@ import ( "crypto/tls" "fmt" "io" - "io/ioutil" "math" "math/rand" "net" @@ -335,13 +334,14 @@ func DNSCaching(ttl time.Duration) func(*Attacker) { for i := 0; i < len(ips) && j < 2; i++ { ip := net.ParseIP(ips[i]) switch { - case len(ip.To4()) == net.IPv4len && j == 0: + case len(ip) == net.IPv4len && (j == 0 || len(ips[j-1]) == net.IPv6len): fallthrough - case len(ip) == net.IPv6len && j == 1: + case len(ip) == net.IPv6len && (j == 0 || len(ips[j-1]) == net.IPv4len): ips[j] = ips[i] j++ } } + ips = ips[:j] type result struct { @@ -541,9 +541,9 @@ func (a *Attacker) hit(tr Targeter, atk *attack) *Result { body = io.LimitReader(r.Body, a.maxBody) } - if res.Body, err = ioutil.ReadAll(body); err != nil { + if res.Body, err = io.ReadAll(body); err != nil { return &res - } else if _, err = io.Copy(ioutil.Discard, r.Body); err != nil { + } else if _, err = io.Copy(io.Discard, r.Body); err != nil { return &res } diff --git a/vendor/github.com/tsenart/vegeta/v12/lib/targets.go b/vendor/github.com/tsenart/vegeta/v12/lib/targets.go index fee3f383bb..ada930d9e4 100644 --- a/vendor/github.com/tsenart/vegeta/v12/lib/targets.go +++ b/vendor/github.com/tsenart/vegeta/v12/lib/targets.go @@ -297,7 +297,7 @@ func NewHTTPTargeter(src io.Reader, body []byte, hdr http.Header) Targeter { } tgt.Method = tokens[0] if _, err = url.ParseRequestURI(tokens[1]); err != nil { - return fmt.Errorf("bad URL: %s", tokens[1]) + return fmt.Errorf("bad URL: %s, %w", tokens[1], err) } tgt.URL = tokens[1] line = strings.TrimSpace(sc.Peek()) @@ -311,7 +311,7 @@ func NewHTTPTargeter(src io.Reader, body []byte, hdr http.Header) Targeter { continue } else if strings.HasPrefix(line, "@") { if tgt.Body, err = os.ReadFile(line[1:]); err != nil { - return fmt.Errorf("bad body: %s", err) + return fmt.Errorf("bad body: %w", err) } break } diff --git a/vendor/modules.txt b/vendor/modules.txt index e5113a110f..60f984ab39 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -265,7 +265,7 @@ github.com/rs/dnscache # github.com/spf13/pflag v1.0.5 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/tsenart/vegeta/v12 v12.11.0 +# github.com/tsenart/vegeta/v12 v12.11.1 ## explicit; go 1.20 github.com/tsenart/vegeta/v12/lib # go.opencensus.io v0.24.0