internal: fix transport_test use of nil Context
The context library recommends never using a nil Context, and
context.Background() provides an empty Context appropriate for use in
unit tests.
Change-Id: I2656f846ea1f892ad41ad63a92ecb789a46e3453
Reviewed-on: https://go-review.googlesource.com/22791
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/internal/transport_test.go b/internal/transport_test.go
index 313f637..8772ec5 100644
--- a/internal/transport_test.go
+++ b/internal/transport_test.go
@@ -18,7 +18,7 @@
})
c := &http.Client{}
- ctx := context.WithValue(nil, HTTPClient, c)
+ ctx := context.WithValue(context.Background(), HTTPClient, c)
hc, err := ContextClient(ctx)
if err != nil {