Merge pull request #455 from testwill/ioutil

chore: remove refs to deprecated io/ioutil
This commit is contained in:
Lakhan Samani 2024-05-20 18:23:40 +05:30 committed by GitHub
commit 9336d3e003
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io"
"net/http" "net/http"
"time" "time"
@ -90,7 +90,7 @@ func TestEndpointResolver(ctx context.Context, params model.TestEndpointRequest)
} }
defer resp.Body.Close() defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) body, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
log.Debug("error reading response: ", err) log.Debug("error reading response: ", err)
return nil, err return nil, err

View File

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"context" "context"
"encoding/json" "encoding/json"
"io/ioutil" "io"
"net/http" "net/http"
"time" "time"
@ -95,7 +95,7 @@ func RegisterEvent(ctx context.Context, eventName string, authRecipe string, use
} }
defer resp.Body.Close() defer resp.Body.Close()
responseBytes, err := ioutil.ReadAll(resp.Body) responseBytes, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
log.Debug("error reading response: ", err) log.Debug("error reading response: ", err)
continue continue