Skip to content

Commit 35c0ff9

Browse files
committed
updating github.go ot use io pkg instead of ioutil pkg after Go 1.21 upgrade
1 parent c7838fc commit 35c0ff9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/github.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"flag"
66
"fmt"
77
"html"
8-
"io/ioutil"
8+
"io"
99
"net/http"
1010
"path"
1111
"strings"
@@ -71,7 +71,7 @@ func main() {
7171
}).Methods("POST")
7272

7373
r.HandleFunc("/api/v3/admin/organizations", func(w http.ResponseWriter, r *http.Request) {
74-
b, err := ioutil.ReadAll(r.Body)
74+
b, err := io.ReadAll(r.Body)
7575
if err != nil {
7676
panic(err)
7777
}
@@ -129,7 +129,7 @@ func main() {
129129

130130
r.HandleFunc("/api/v3/orgs/{org}/repos", func(w http.ResponseWriter, r *http.Request) {
131131
orgName := mux.Vars(r)["org"]
132-
b, err := ioutil.ReadAll(r.Body)
132+
b, err := io.ReadAll(r.Body)
133133
if err != nil {
134134
panic(err)
135135
}
@@ -178,7 +178,7 @@ func main() {
178178
}).Methods("POST")
179179

180180
r.HandleFunc("/api/v3/user/repos", func(w http.ResponseWriter, r *http.Request) {
181-
b, err := ioutil.ReadAll(r.Body)
181+
b, err := io.ReadAll(r.Body)
182182
if err != nil {
183183
panic(err)
184184
}

0 commit comments

Comments
 (0)