From 80424cf627be31ba673bf4532d017ec6b1921f2b Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 18 Aug 2023 15:43:33 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- mimetype.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mimetype.go b/mimetype.go index 1b5909b7..40d6e20b 100644 --- a/mimetype.go +++ b/mimetype.go @@ -7,7 +7,6 @@ package mimetype import ( "io" - "io/ioutil" "mime" "os" "sync/atomic" @@ -48,7 +47,7 @@ func DetectReader(r io.Reader) (*MIME, error) { // Using atomic because readLimit can be written at the same time in other goroutine. l := atomic.LoadUint32(&readLimit) if l == 0 { - in, err = ioutil.ReadAll(r) + in, err = io.ReadAll(r) if err != nil { return errMIME, err }