From d4f6f273bc36d8ce376cd7aee794458011fee2e0 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 26 Apr 2024 15:24:28 +0800 Subject: chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- api/http/git_file_upload_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/http/git_file_upload_handler.go') diff --git a/api/http/git_file_upload_handler.go b/api/http/git_file_upload_handler.go index 1702b8b1..2f02baf1 100644 --- a/api/http/git_file_upload_handler.go +++ b/api/http/git_file_upload_handler.go @@ -3,7 +3,7 @@ package http import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "github.com/gorilla/mux" @@ -64,7 +64,7 @@ func (gufh *gitUploadFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Requ return } defer file.Close() - fileBytes, err := ioutil.ReadAll(file) + fileBytes, err := io.ReadAll(file) if err != nil { http.Error(rw, "invalid file", http.StatusBadRequest) return -- cgit