1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-09-27 23:05:55 -04: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 // Content was larger than max size
return nil, ErrTooLarge return nil, ErrTooLarge
} else if err != io.EOF { } else if err != io.EOF {
if errors.Is(err, os.ErrDeadlineExceeded) { if os.IsTimeout(err) {
// Timed out // I would use
// errors.Is(err, os.ErrDeadlineExceeded)
// but that isn't supported before Go 1.15.
return nil, ErrTimedOut return nil, ErrTimedOut
} }
// Some other error // Some other error