examples/client: Use context

This commit is contained in:
Adnan Maolood 2021-02-20 15:39:47 -05:00
parent 3f4fd10b6d
commit 28b6232fbf

View File

@ -7,6 +7,7 @@ package main
import ( import (
"bufio" "bufio"
"bytes" "bytes"
"context"
"crypto/x509" "crypto/x509"
"errors" "errors"
"fmt" "fmt"
@ -90,7 +91,7 @@ func do(req *gemini.Request, via []*gemini.Request) (*gemini.Response, error) {
client := gemini.Client{ client := gemini.Client{
TrustCertificate: trustCertificate, TrustCertificate: trustCertificate,
} }
resp, err := client.Do(req) resp, err := client.Do(context.Background(), req)
if err != nil { if err != nil {
return resp, err return resp, err
} }