Skip to content

Commit 52645c6

Browse files
authored
Use ioutil for compatibility with older Go versions (#31)
Co-authored-by: Noah Goldstein <[email protected]>
1 parent f23f745 commit 52645c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitdiff/patch_header.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"fmt"
77
"io"
8+
"io/ioutil"
89
"mime/quotedprintable"
910
"net/mail"
1011
"strconv"
@@ -477,7 +478,7 @@ func decodeSubject(encoded string) string {
477478
payload = strings.ReplaceAll(payload, " =?UTF-8?q?", "")
478479
payload = strings.ReplaceAll(payload, "?=", "")
479480

480-
decoded, err := io.ReadAll(quotedprintable.NewReader(strings.NewReader(payload)))
481+
decoded, err := ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(payload)))
481482
if err != nil {
482483
// if err, abort decoding and return original subject
483484
return encoded

0 commit comments

Comments
 (0)