From d93eebbeb8bc9140aec8646df555058924a17eca Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 26 Feb 2022 13:51:04 -0600 Subject: [PATCH] patch_header.go: Fix build issue with older go versions --- gitdiff/patch_header.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitdiff/patch_header.go b/gitdiff/patch_header.go index c3c387d..f2c3868 100644 --- a/gitdiff/patch_header.go +++ b/gitdiff/patch_header.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "mime/quotedprintable" "net/mail" "strconv" @@ -477,7 +478,7 @@ func decodeSubject(encoded string) string { payload = strings.ReplaceAll(payload, " =?UTF-8?q?", "") payload = strings.ReplaceAll(payload, "?=", "") - decoded, err := io.ReadAll(quotedprintable.NewReader(strings.NewReader(payload))) + decoded, err := ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(payload))) if err != nil { // if err, abort decoding and return original subject return encoded