diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-01-10 01:48:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 09:48:13 +0800 |
commit | 242dddfcb7cfab1d21c1658828d94f603809a5c7 (patch) | |
tree | ee10a755954c3f0a84d00d848a66333925357672 /modules | |
parent | 60b945565dc3ef587ec147927102fe1afaded140 (diff) | |
download | gitea-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.go | 4 |
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 } |