We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 087ab44 commit 8cfa591Copy full SHA for 8cfa591
2 files changed
README.md
@@ -36,9 +36,9 @@ func main() {
36
lim := bwlimit.NewLimiter(100, 0)
37
defer lim.Stop()
38
39
- // wrap the default http transport DialContext
+ // set the default http transport DialContext
40
tp := http.DefaultTransport.(*http.Transport)
41
- tp.DialContext = lim.Wrap(tp.DialContext)
+ tp.DialContext = lim.Wrap(nil).DialContext
42
43
// make a request and time it
44
now := time.Now()
example_test.go
@@ -21,7 +21,7 @@ func ExampleLimiter_NewLimiter() {
21
22
23
24
25
26
tp.DialContext = lim.Wrap(nil).DialContext
27
0 commit comments