From 242dddfcb7cfab1d21c1658828d94f603809a5c7 Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 10 Jan 2022 01:48:13 +0000 Subject: 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 --- modules/updatechecker/update_checker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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 } -- cgit v1.2.3