aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2022-04-01 18:11:16 +0200
committerGravatar GitHub <noreply@github.com> 2022-04-01 18:11:16 +0200
commit7a5afddf5b805a022f8e81281c772c11600da2f4 (patch)
tree76ecbf4981921328d823eb925e57f874f52c34f2 /http.go
parentsupport adding/removing clients from LBClient (#1243) (diff)
downloadfasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.gz
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.tar.bz2
fasthttp-7a5afddf5b805a022f8e81281c772c11600da2f4.zip
Use %v for errors and %q for strings (#1262)v1.35.0
Mostly in tests.
Diffstat (limited to 'http.go')
-rw-r--r--http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.go b/http.go
index 75b40c9..4771db0 100644
--- a/http.go
+++ b/http.go
@@ -932,7 +932,7 @@ func WriteMultipartForm(w io.Writer, f *multipart.Form, boundary string) error {
}
fh, err := fv.Open()
if err != nil {
- return fmt.Errorf("cannot open form file %q (%q): %s", k, fv.Filename, err)
+ return fmt.Errorf("cannot open form file %q (%q): %w", k, fv.Filename, err)
}
if _, err = copyZeroAlloc(vw, fh); err != nil {
return fmt.Errorf("error when copying form file %q (%q): %w", k, fv.Filename, err)
@@ -2168,7 +2168,7 @@ func parseChunkSize(r *bufio.Reader) (int, error) {
c, err := r.ReadByte()
if err != nil {
return -1, ErrBrokenChunk{
- error: fmt.Errorf("cannot read '\r' char at the end of chunk size: %s", err),
+ error: fmt.Errorf("cannot read '\r' char at the end of chunk size: %w", err),
}
}
// Skip chunk extension after chunk size.