From 84c18c9e94db53f29ea2ec5379558d7e719193bd Mon Sep 17 00:00:00 2001 From: Kelsey Hightower Date: Sat, 3 Dec 2022 08:03:11 -0800 Subject: [PATCH] update documentation --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 79d26b6..ad0c219 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ package main import ( "net/http" - "os" "github.com/kelseyhightower/run" ) @@ -66,12 +65,9 @@ func main() { return } - // Use the run.Transport to automatically attach ID tokens to outbound requests - // and optionally expand service names using the Cloud Run API. - // See https://pkg.go.dev/github.com/kelseyhightower/run?tab=doc#Transport - client := http.Client{Transport: &run.Transport{EnableServiceNameResolution: false}} - - response, err := client.Do(request) + // Use the run.Client to automatically attach ID tokens to outbound requests + // and optionally lookup service names using Service Directory. + response, err := run.Client.Do(request) if err != nil { http.Error(w, err.Error(), 500) return