diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2023-06-13 16:18:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 15:18:59 +0200 |
commit | ffdf59d04ca2f02556308d60d37b8e77ea04484c (patch) | |
tree | cad591ac557fce7673b2c7d52a6863c7694b4e37 /fasthttputil | |
parent | add DisableSpecialHeaders option (#1573) (diff) | |
download | fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.tar.gz fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.tar.bz2 fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.zip |
Diffstat (limited to 'fasthttputil')
-rw-r--r-- | fasthttputil/pipeconns.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fasthttputil/pipeconns.go b/fasthttputil/pipeconns.go index 8a338e1..4ec4130 100644 --- a/fasthttputil/pipeconns.go +++ b/fasthttputil/pipeconns.go @@ -218,8 +218,7 @@ var ( errConnectionClosed = errors.New("connection closed") ) -type timeoutError struct { -} +type timeoutError struct{} func (e *timeoutError) Error() string { return "timeout" @@ -233,10 +232,8 @@ func (e *timeoutError) Timeout() bool { return true } -var ( - // ErrTimeout is returned from Read() or Write() on timeout. - ErrTimeout = &timeoutError{} -) +// ErrTimeout is returned from Read() or Write() on timeout. +var ErrTimeout = &timeoutError{} func (c *pipeConn) Close() error { return c.pc.Close() |