🐛 Support Go 1.13 and 1.14
This commit is contained in:
parent
c53c36a4d0
commit
1aeaadbb19
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue