From 9cffc45f0347e5c8b801c151955fa9326b9b2ba7 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Wed, 17 Aug 2022 16:19:45 +0200 Subject: go: removed io/ioutil Since the minimum required version of Go has been bumped to 1.16, the deprecation of io/ioutil can now be acted upon. This Commit removes the remaining dependencies on ioutil and replaces them with their io or os counterparts. Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- lib/parse/hyperlinks_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/parse/hyperlinks_test.go') diff --git a/lib/parse/hyperlinks_test.go b/lib/parse/hyperlinks_test.go index f16392a5..ba67664b 100644 --- a/lib/parse/hyperlinks_test.go +++ b/lib/parse/hyperlinks_test.go @@ -1,7 +1,7 @@ package parse_test import ( - "io/ioutil" + "io" "strings" "testing" @@ -75,7 +75,7 @@ func TestHyperlinks(t *testing.T) { // make sure reader is exact copy of input reader reader, links := parse.HttpLinks(strings.NewReader(test.text)) - if data, err := ioutil.ReadAll(reader); err != nil { + if data, err := io.ReadAll(reader); err != nil { t.Errorf("could not read text: %v", err) } else if string(data) != test.text { t.Errorf("did not copy input reader correctly") -- cgit