aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorguoguangwu <guoguangwug@gmail.com>2024-04-26 15:24:28 +0800
committersudoforge <no-reply@sudoforge.com>2024-07-23 20:22:15 -0700
commitd4f6f273bc36d8ce376cd7aee794458011fee2e0 (patch)
treebd2f95e167152d7554b10acd29d353370913e6f6 /api
parent1fa858dcf4c4e7b572316705d70c08545abae7ff (diff)
downloadgit-bug-d4f6f273bc36d8ce376cd7aee794458011fee2e0.tar.gz
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com> chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Diffstat (limited to 'api')
-rw-r--r--api/http/git_file_upload_handler.go4
1 files changed, 2 insertions, 2 deletions
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