summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-01-10 01:48:13 +0000
committerGitHub <noreply@github.com>2022-01-10 09:48:13 +0800
commit242dddfcb7cfab1d21c1658828d94f603809a5c7 (patch)
treeee10a755954c3f0a84d00d848a66333925357672 /modules
parent60b945565dc3ef587ec147927102fe1afaded140 (diff)
downloadgitea-242dddfcb7cfab1d21c1658828d94f603809a5c7.tar.gz
gitea-242dddfcb7cfab1d21c1658828d94f603809a5c7.zip
Remove `ioutil` (#18222)
- Don't use `ioutil` package anymore as it doesn't anything special anymore since Go 1.16: ``` // As of Go 1.16, the same functionality is now provided // by package io or package os, and those implementations // should be preferred in new code. ``` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/updatechecker/update_checker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/updatechecker/update_checker.go b/modules/updatechecker/update_checker.go
index 6c43309c1e..149a8462f6 100644
--- a/modules/updatechecker/update_checker.go
+++ b/modules/updatechecker/update_checker.go
@@ -5,7 +5,7 @@
package updatechecker
import (
- "io/ioutil"
+ "io"
"net/http"
"code.gitea.io/gitea/modules/appstate"
@@ -43,7 +43,7 @@ func GiteaUpdateChecker(httpEndpoint string) error {
return err
}
defer resp.Body.Close()
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}