diff options
author | guoguangwu <guoguangwug@gmail.com> | 2024-04-26 15:24:28 +0800 |
---|---|---|
committer | sudoforge <no-reply@sudoforge.com> | 2024-07-23 20:22:15 -0700 |
commit | d4f6f273bc36d8ce376cd7aee794458011fee2e0 (patch) | |
tree | bd2f95e167152d7554b10acd29d353370913e6f6 /bridge/github/config.go | |
parent | 1fa858dcf4c4e7b572316705d70c08545abae7ff (diff) | |
download | git-bug-d4f6f273bc36d8ce376cd7aee794458011fee2e0.tar.gz |
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Diffstat (limited to 'bridge/github/config.go')
-rw-r--r-- | bridge/github/config.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go index 2f5d1f3b..9ae1d187 100644 --- a/bridge/github/config.go +++ b/bridge/github/config.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "regexp" @@ -233,7 +233,7 @@ func requestUserVerificationCode(scope string) (*githRespT, error) { return nil, fmt.Errorf("unexpected response status code %d from Github API", resp.StatusCode) } - data, err := ioutil.ReadAll(resp.Body) + data, err := io.ReadAll(resp.Body) if err != nil { return nil, errors.Wrap(err, "error requesting user verification code") } @@ -284,7 +284,7 @@ func pollGithubForAuthorization(deviceCode string, intervalSec int64) (string, e return "", fmt.Errorf("unexpected response status code %d from Github API", resp.StatusCode) } - data, err := ioutil.ReadAll(resp.Body) + data, err := io.ReadAll(resp.Body) if err != nil { _ = resp.Body.Close() return "", errors.Wrap(err, "error polling the Github API") @@ -490,7 +490,7 @@ func validateUsername(username string) (bool, string, error) { return false, "", nil } - data, err := ioutil.ReadAll(resp.Body) + data, err := io.ReadAll(resp.Body) if err != nil { return false, "", err } |