diff options
| author | Adnan Maolood <[email protected]> | 2021-02-20 15:39:47 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-20 15:39:47 -0500 |
| commit | 28b6232fbfa5a4f29c8775a675f39a06e2476703 (patch) | |
| tree | 3432b4f57dc31550f87109382fc5c6887e2b57f8 /examples | |
| parent | client: Make Get and Do accept a Context (diff) | |
| download | archived-go-gemini-28b6232fbfa5a4f29c8775a675f39a06e2476703.tar.xz archived-go-gemini-28b6232fbfa5a4f29c8775a675f39a06e2476703.zip | |
examples/client: Use context
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/client.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/client.go b/examples/client.go index 14abe27..a7cc274 100644 --- a/examples/client.go +++ b/examples/client.go @@ -7,6 +7,7 @@ package main import ( "bufio" "bytes" + "context" "crypto/x509" "errors" "fmt" @@ -90,7 +91,7 @@ func do(req *gemini.Request, via []*gemini.Request) (*gemini.Response, error) { client := gemini.Client{ TrustCertificate: trustCertificate, } - resp, err := client.Do(req) + resp, err := client.Do(context.Background(), req) if err != nil { return resp, err } |