Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kelseyhightower committed Dec 3, 2022
1 parent 240974f commit 84c18c9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ package main

import (
"net/http"
"os"

"github.com/kelseyhightower/run"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 84c18c9

Please sign in to comment.