Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschuch committed Nov 23, 2023
1 parent 202c7f0 commit 6588369
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions internal/aws/federation/federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package federation
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"net/url"
"strconv"
Expand Down Expand Up @@ -40,9 +41,14 @@ func GetSignInLink(credentials aws.Credentials, issuer, dashboardURL string, dur
if err != nil {
return "", fmt.Errorf("failed getting federation URL: %w", err)
}
defer response.Body.Close()
defer func() {
err := response.Body.Close()
if err != nil {
log.Print(err)
}
}()

bodyBytes, err := ioutil.ReadAll(response.Body)
bodyBytes, err := io.ReadAll(response.Body)
if err != nil {
return "", fmt.Errorf("failed reading response body: %w", err)
}
Expand Down

0 comments on commit 6588369

Please sign in to comment.