Timeout checks if err was caused by a timeout. To be specific, it is true if err was caused within pgconn by a context.DeadlineExceeded or an implementer of net.Error where Timeout() is true.
(err error)
| 22 | // Timeout checks if err was caused by a timeout. To be specific, it is true if err was caused within pgconn by a |
| 23 | // context.DeadlineExceeded or an implementer of net.Error where Timeout() is true. |
| 24 | func Timeout(err error) bool { |
| 25 | var timeoutErr *errTimeout |
| 26 | return errors.As(err, &timeoutErr) |
| 27 | } |
| 28 | |
| 29 | // PgError represents an error reported by the PostgreSQL server. See |
| 30 | // http://www.postgresql.org/docs/current/static/protocol-error-fields.html for |
no outgoing calls