1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-04 01:27:20 +00:00

Remove deprecated packages & staticcheck fixes (#22012)

`ioutil` is deprecated and should use `io` instead
This commit is contained in:
Chongyi Zheng
2022-12-02 17:06:23 -05:00
committed by GitHub
parent 21bcb92926
commit 8698458f48
7 changed files with 15 additions and 16 deletions

View File

@ -5,7 +5,7 @@ package integration
import (
"fmt"
"io/ioutil"
"io"
"net/http"
"testing"
@ -41,7 +41,7 @@ func TestAPIViewPulls(t *testing.T) {
pull := pulls[0]
if assert.EqualValues(t, 5, pull.ID) {
resp = ctx.Session.MakeRequest(t, NewRequest(t, "GET", pull.DiffURL), http.StatusOK)
_, err := ioutil.ReadAll(resp.Body)
_, err := io.ReadAll(resp.Body)
assert.NoError(t, err)
// TODO: use diff to generate stats to test against