Skip to content

Commit

Permalink
chore(deps): Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
reneleonhardt committed Jul 7, 2024
1 parent 3ddcb83 commit 8d55312
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Before submitting a pull request be sure to check the code with [gometalinter](https://github.com/alecthomas/gometalinter).
Before submitting a pull request be sure to check the code with [golangci-lint](https://github.com/golangci/golangci-lint).
This can save a considerable amount of time during code review.

Generally, try to follow this format when writing commit messages:
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
16 changes: 6 additions & 10 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: v1.0
name: codesenberg/bombardier
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
type: e2-standard-2
os_image: ubuntu2204
blocks:
- name: Test
task:
Expand All @@ -12,17 +12,13 @@ blocks:
- checkout
- go install gotest.tools/gotestsum@latest
jobs:
- name: Test go 1.18
- name: Test go 1.21
commands:
- sem-version go 1.18
- sem-version go 1.21.12
- gotestsum --junitfile report.xml ./...
- name: Test go 1.19
- name: Test go 1.22
commands:
- sem-version go 1.19
- gotestsum --junitfile report.xml ./...
- name: Test go 1.20
commands:
- sem-version go 1.20
- sem-version go 1.22.5
- gotestsum --junitfile report.xml ./...
epilogue:
always:
Expand Down
11 changes: 5 additions & 6 deletions bombardier.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"os"
"os/signal"
"strings"
Expand Down Expand Up @@ -108,7 +107,7 @@ func newBombardier(c config) (*bombardier, error) {
}
} else {
bsp = func() (io.ReadCloser, error) {
return ioutil.NopCloser(
return io.NopCloser(
proxyReader{strings.NewReader(c.body)},
), nil
}
Expand All @@ -117,7 +116,7 @@ func newBombardier(c config) (*bombardier, error) {
pbody = &c.body
if c.bodyFilePath != "" {
var bodyBytes []byte
bodyBytes, err = ioutil.ReadFile(c.bodyFilePath)
bodyBytes, err = os.ReadFile(c.bodyFilePath)
if err != nil {
return nil, err
}
Expand All @@ -144,7 +143,7 @@ func newBombardier(c config) (*bombardier, error) {
b.client = makeHTTPClient(c.clientType, cc)

if !b.conf.printProgress {
b.bar.Output = ioutil.Discard
b.bar.Output = io.Discard
b.bar.NotPrint = true
}

Expand Down Expand Up @@ -184,7 +183,7 @@ func (b *bombardier) prepareTemplate() (*template.Template, error) {
case knownFormat:
templateBytes = f.template()
case userDefinedTemplate:
templateBytes, err = ioutil.ReadFile(string(f))
templateBytes, err = os.ReadFile(string(f))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -436,7 +435,7 @@ func (b *bombardier) redirectOutputTo(out io.Writer) {
}

func (b *bombardier) disableOutput() {
b.redirectOutputTo(ioutil.Discard)
b.redirectOutputTo(io.Discard)
b.bar.NotPrint = true
}

Expand Down
14 changes: 7 additions & 7 deletions bombardier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"crypto/tls"
"crypto/x509"
"errors"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -488,7 +488,7 @@ func testBombardierSendsBody(clientType clientTyp, t *testing.T) {
requestBody := "abracadabra"
s := httptest.NewServer(
http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Error(err)
return
Expand Down Expand Up @@ -530,14 +530,14 @@ func TestBombardierSendsBodyFromFile(t *testing.T) {
func testBombardierSendsBodyFromFile(clientType clientTyp, t *testing.T) {
response := []byte("OK")
bodyPath := "testbody.txt"
requestBody, err := ioutil.ReadFile(bodyPath)
requestBody, err := os.ReadFile(bodyPath)
if err != nil {
t.Error(err)
return
}
s := httptest.NewServer(
http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Error(err)
return
Expand Down Expand Up @@ -601,7 +601,7 @@ func testBombardierStreamsBody(clientType clientTyp, t *testing.T) {
if te := r.TransferEncoding; !reflect.DeepEqual(te, []string{"chunked"}) {
t.Errorf("Expected chunked transfer encoding, but got %v", te)
}
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Error(err)
return
Expand Down Expand Up @@ -644,7 +644,7 @@ func TestBombardierStreamsBodyFromFile(t *testing.T) {
func testBombardierStreamsBodyFromFile(clientType clientTyp, t *testing.T) {
response := []byte("OK")
bodyPath := "testbody.txt"
requestBody, err := ioutil.ReadFile(bodyPath)
requestBody, err := os.ReadFile(bodyPath)
if err != nil {
t.Error(err)
return
Expand All @@ -654,7 +654,7 @@ func testBombardierStreamsBodyFromFile(clientType clientTyp, t *testing.T) {
if te := r.TransferEncoding; !reflect.DeepEqual(te, []string{"chunked"}) {
t.Errorf("Expected chunked transfer encoding, but got %v", te)
}
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
t.Error(err)
return
Expand Down
5 changes: 2 additions & 3 deletions clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"crypto/tls"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
Expand Down Expand Up @@ -167,7 +166,7 @@ func (c *httpClient) do() (
if c.body != nil {
br := strings.NewReader(*c.body)
req.ContentLength = int64(len(*c.body))
req.Body = ioutil.NopCloser(br)
req.Body = io.NopCloser(br)
} else {
bs, bserr := c.bodProd()
if bserr != nil {
Expand All @@ -183,7 +182,7 @@ func (c *httpClient) do() (
} else {
code = resp.StatusCode

_, berr := io.Copy(ioutil.Discard, resp.Body)
_, berr := io.Copy(io.Discard, resp.Body)
if berr != nil {
err = berr
}
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/codesenberg/bombardier

go 1.18
go 1.21

require (
github.com/alecthomas/kingpin v2.2.6+incompatible
Expand All @@ -9,19 +9,19 @@ require (
github.com/goware/urlx v0.3.2
github.com/juju/ratelimit v1.0.2
github.com/satori/go.uuid v1.2.0
github.com/valyala/fasthttp v1.51.0
github.com/valyala/fasthttp v1.55.0
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
)
32 changes: 20 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,51 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs=
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo=
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
github.com/codesenberg/concurrent v0.0.0-20180531114123-64560cfcf964 h1:9MVnbW3h0Dl4E2oADqwyvODphl9jY1r5HMtcB8U5mGs=
github.com/codesenberg/concurrent v0.0.0-20180531114123-64560cfcf964/go.mod h1:82C6OyVM6eVk7qpBAZXE9uszHUuXWJMHHOeY+b/CSIA=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/goware/urlx v0.3.2 h1:gdoo4kBHlkqZNaf6XlQ12LGtQOmpKJrR04Rc3RnpJEo=
github.com/goware/urlx v0.3.2/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw=
github.com/juju/ratelimit v1.0.2 h1:sRxmtRiajbvrcLQT7S+JbqU0ntsb9W2yhSdNN8tWfaI=
github.com/juju/ratelimit v1.0.2/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8=
github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit 8d55312

Please sign in to comment.