mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
Refactor: move from io/ioutil to io and os package (#2234)
The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
@@ -67,7 +67,7 @@ func makeHTTPRequest(ctx context.Context, webhookEndPoint, method string, payloa
|
||||
if requestErr != nil {
|
||||
return requestErr
|
||||
}
|
||||
body, requestErr = ioutil.ReadAll(r.Body)
|
||||
body, requestErr = io.ReadAll(r.Body)
|
||||
if requestErr != nil {
|
||||
return requestErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user