Skip to content

Commit

Permalink
fix: replace deprecated io/ioutil with io
Browse files Browse the repository at this point in the history
  • Loading branch information
Beebeeoii committed Aug 9, 2024
1 parent 3d0ede5 commit 88e7467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/api/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"

appFile "github.com/beebeeoii/lominus/internal/file"
Expand Down Expand Up @@ -218,7 +218,7 @@ func (req Request) Send(res interface{}) error {
return err
}

body, err := ioutil.ReadAll(response.Body)
body, err := io.ReadAll(response.Body)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package api

import (
"encoding/json"
"io/ioutil"
"io"
"net/http"
)

Expand All @@ -25,7 +25,7 @@ func (req Request) GetRawResponse(res interface{}) error {
return err
}

body, err := ioutil.ReadAll(response.Body)
body, err := io.ReadAll(response.Body)
if err != nil {
return err
}
Expand Down

0 comments on commit 88e7467

Please sign in to comment.