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 --- worker/lib/search.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worker/lib/search.go') diff --git a/worker/lib/search.go b/worker/lib/search.go index 551d33cd..fe1ec114 100644 --- a/worker/lib/search.go +++ b/worker/lib/search.go @@ -1,7 +1,7 @@ package lib import ( - "io/ioutil" + "io" "net/textproto" "strings" "unicode" @@ -129,7 +129,7 @@ func searchMessage(message RawMessage, criteria *searchCriteria, return false, err } defer reader.Close() - bytes, err := ioutil.ReadAll(reader) + bytes, err := io.ReadAll(reader) if err != nil { return false, err } @@ -141,7 +141,7 @@ func searchMessage(message RawMessage, criteria *searchCriteria, return false, err } defer reader.Close() - bytes, err := ioutil.ReadAll(reader) + bytes, err := io.ReadAll(reader) if err != nil { return false, err } -- cgit