aboutsummaryrefslogtreecommitdiff
path: root/fasthttputil
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2021-12-13 16:41:34 +0800
committerGravatar GitHub <noreply@github.com> 2021-12-13 09:41:34 +0100
commite9db537178708982f64736dbdedfddd2a168d395 (patch)
tree705174cc0a2f0dd156dc98b578f14b7616608eba /fasthttputil
parentFix bad request trailer panic (diff)
downloadfasthttp-e9db537178708982f64736dbdedfddd2a168d395.tar.gz
fasthttp-e9db537178708982f64736dbdedfddd2a168d395.tar.bz2
fasthttp-e9db537178708982f64736dbdedfddd2a168d395.zip
Use %w to wrap errors (#1175)
Diffstat (limited to 'fasthttputil')
-rw-r--r--fasthttputil/pipeconns_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/fasthttputil/pipeconns_test.go b/fasthttputil/pipeconns_test.go
index d61e5e5..709c994 100644
--- a/fasthttputil/pipeconns_test.go
+++ b/fasthttputil/pipeconns_test.go
@@ -164,7 +164,7 @@ func testPipeConnsCloseWhileReadWrite(t *testing.T) {
var err error
if _, err = io.Copy(ioutil.Discard, c1); err != nil {
if err != errConnectionClosed {
- err = fmt.Errorf("unexpected error: %s", err)
+ err = fmt.Errorf("unexpected error: %w", err)
} else {
err = nil
}
@@ -178,7 +178,7 @@ func testPipeConnsCloseWhileReadWrite(t *testing.T) {
for {
if _, err = c2.Write([]byte("foobar")); err != nil {
if err != errConnectionClosed {
- err = fmt.Errorf("unexpected error: %s", err)
+ err = fmt.Errorf("unexpected error: %w", err)
} else {
err = nil
}