diff options
author | Maxim Lebedev <toby3d@yandex.com> | 2019-05-06 20:54:49 +0500 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2019-05-06 17:54:49 +0200 |
commit | f544170d6384e251aa6657e55bac36c999c86e7a (patch) | |
tree | e55dc8af183dfe5e22a2191f96460ab75282a019 /client_timing_test.go | |
parent | Timing fixes (#564) (diff) | |
download | fasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.tar.gz fasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.tar.bz2 fasthttp-f544170d6384e251aa6657e55bac36c999c86e7a.zip |
Added methods constants (#567)
* :sparkles: Added methods constants
* :ok_hand: Fixed methods comment due to review changes
Diffstat (limited to 'client_timing_test.go')
-rw-r--r-- | client_timing_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client_timing_test.go b/client_timing_test.go index 2a5363a..8cc72a2 100644 --- a/client_timing_test.go +++ b/client_timing_test.go @@ -157,7 +157,7 @@ func BenchmarkNetHTTPClientDoFastServer(b *testing.B) { nn := uint32(0) b.RunParallel(func(pb *testing.PB) { - req, err := http.NewRequest("GET", fmt.Sprintf("http://foobar%d.com/aaa/bbb", atomic.AddUint32(&nn, 1)), nil) + req, err := http.NewRequest(MethodGet, fmt.Sprintf("http://foobar%d.com/aaa/bbb", atomic.AddUint32(&nn, 1)), nil) if err != nil { b.Fatalf("unexpected error: %s", err) } @@ -542,7 +542,7 @@ func benchmarkNetHTTPClientEndToEndBigResponseInmemory(b *testing.B, parallelism url := "http://unused.host" + requestURI b.SetParallelism(parallelism) b.RunParallel(func(pb *testing.PB) { - req, err := http.NewRequest("GET", url, nil) + req, err := http.NewRequest(MethodGet, url, nil) if err != nil { b.Fatalf("unexpected error: %s", err) } |