diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..5445036 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f725f24..9a9ba21 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,12 +11,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3.5.3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.16 + go-version: 1.18 - name: Build run: go build -v ./... @@ -31,8 +31,8 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3.5.3 - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: version: latest diff --git a/go.mod b/go.mod index 01ad4af..759e3a1 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/jbowes/httpsig -go 1.16 +go 1.18 diff --git a/httpsig.go b/httpsig.go index 014c5a9..7cb53ec 100644 --- a/httpsig.go +++ b/httpsig.go @@ -8,7 +8,7 @@ import ( "bytes" "crypto/ecdsa" "crypto/rsa" - "io/ioutil" + "io" "net/http" "time" ) @@ -68,7 +68,7 @@ func NewSignTransport(transport http.RoundTripper, opts ...signOption) http.Roun defer r.Body.Close() if n != 0 { - r.Body = ioutil.NopCloser(bytes.NewReader(b.Bytes())) + r.Body = io.NopCloser(bytes.NewReader(b.Bytes())) } } @@ -144,7 +144,7 @@ func NewVerifyMiddleware(opts ...verifyOption) func(http.Handler) http.Handler { defer r.Body.Close() if n != 0 { - r.Body = ioutil.NopCloser(bytes.NewReader(b.Bytes())) + r.Body = io.NopCloser(bytes.NewReader(b.Bytes())) } }