1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-06-19 19:25:24 +00:00

🐛 Support Go 1.13 and 1.14

This commit is contained in:
makeworld 2020-11-23 21:26:44 -05:00
parent c53c36a4d0
commit 1aeaadbb19

View File

@ -69,8 +69,11 @@ func MakePage(url string, res *gemini.Response, width, leftMargin int, proxied b
// Content was larger than max size
return nil, ErrTooLarge
} else if err != io.EOF {
if errors.Is(err, os.ErrDeadlineExceeded) {
// Timed out
if os.IsTimeout(err) {
// I would use
// errors.Is(err, os.ErrDeadlineExceeded)
// but that isn't supported before Go 1.15.
return nil, ErrTimedOut
}
// Some other error