Skip to content

Commit

Permalink
Upgrade to Go 1.20 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
francescomari authored Apr 16, 2024
1 parent ec301c6 commit 7effc37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
strategy:
matrix:
go-version:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
steps:
- name: Install Go
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

module github.com/adobe/ims-go

go 1.18
go 1.20

require github.com/golang-jwt/jwt/v5 v5.2.1
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
5 changes: 3 additions & 2 deletions ims/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package ims

import (
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -87,8 +88,8 @@ func (c *Client) do(req *http.Request) (_ *Response, e error) {
}

defer func() {
if err := res.Body.Close(); err != nil && e == nil {
e = fmt.Errorf("close body: %v", err)
if err := res.Body.Close(); err != nil {
e = errors.Join(e, fmt.Errorf("close body: %v", err))
}
}()

Expand Down

0 comments on commit 7effc37

Please sign in to comment.