1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Remove deprecated io/ioutil package

Miniflux now requires at least Go 1.16 and io/util is deprecated.

https://golang.org/doc/go1.16#ioutil
This commit is contained in:
Frédéric Guillot 2021-02-16 21:19:03 -08:00 committed by fguillot
parent 713d575bad
commit a352aff93b
16 changed files with 26 additions and 36 deletions

View file

@ -7,7 +7,6 @@ package encoding // import "miniflux.app/reader/encoding"
import (
"bytes"
"io"
"io/ioutil"
"unicode/utf8"
"golang.org/x/net/html/charset"
@ -25,7 +24,7 @@ import (
// - Feeds with encoding specified only in XML document and not in HTTP header
// - Feeds with wrong encoding defined and already in UTF-8
func CharsetReader(label string, input io.Reader) (io.Reader, error) {
buffer, _ := ioutil.ReadAll(input)
buffer, _ := io.ReadAll(input)
r := bytes.NewReader(buffer)
// The document is already UTF-8, do not do anything (avoid double-encoding).