From 35c0ff9f0e6546b5cf58b24200b95d019cc08ea0 Mon Sep 17 00:00:00 2001 From: Shawn Hartsell Date: Tue, 16 Jan 2024 15:33:03 -0600 Subject: [PATCH] updating github.go ot use io pkg instead of ioutil pkg after Go 1.21 upgrade --- test/github.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/github.go b/test/github.go index 73f5ca3..a6fcca9 100644 --- a/test/github.go +++ b/test/github.go @@ -5,7 +5,7 @@ import ( "flag" "fmt" "html" - "io/ioutil" + "io" "net/http" "path" "strings" @@ -71,7 +71,7 @@ func main() { }).Methods("POST") r.HandleFunc("/api/v3/admin/organizations", func(w http.ResponseWriter, r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) if err != nil { panic(err) } @@ -129,7 +129,7 @@ func main() { r.HandleFunc("/api/v3/orgs/{org}/repos", func(w http.ResponseWriter, r *http.Request) { orgName := mux.Vars(r)["org"] - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) if err != nil { panic(err) } @@ -178,7 +178,7 @@ func main() { }).Methods("POST") r.HandleFunc("/api/v3/user/repos", func(w http.ResponseWriter, r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) if err != nil { panic(err) }