From 22e3257353e678a47c3c489c48d488fe4fef2814 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 4 Oct 2024 22:17:54 +0800 Subject: [PATCH] Fix format issue in bfe_http/request_test.go (#1163) Signed-off-by: cuishuang --- bfe_http/request_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bfe_http/request_test.go b/bfe_http/request_test.go index 76bb138c..8548707e 100644 --- a/bfe_http/request_test.go +++ b/bfe_http/request_test.go @@ -30,9 +30,7 @@ import ( "reflect" "strings" "testing" -) -import ( "github.com/bfenetworks/bfe/bfe_bufio" ) @@ -397,7 +395,7 @@ func testMissingFile(t *testing.T, req *Request) { t.Errorf("FormFile file = %v, want nil", f) } if fh != nil { - t.Errorf("FormFile file header = %q, want nil", fh) + t.Errorf("FormFile file header = %v, want nil", fh) } if err != ErrMissingFile { t.Errorf("FormFile err = %q, want ErrMissingFile", err) @@ -497,7 +495,7 @@ Content-Disposition: form-data; name="textb" ` func benchmarkReadRequest(b *testing.B, request string) { - request += "\n" // final \n + request += "\n" // final \n request = strings.ReplaceAll(request, "\n", "\r\n") // expand \n to \r\n b.SetBytes(int64(len(request))) r := bfe_bufio.NewReader(&infiniteReader{buf: []byte(request)})