Fix lint errors in examples.

pull/4/head
Mariano Cano 6 years ago
parent 6617c93732
commit 89fb49c6d7

@ -105,6 +105,9 @@ func main() {
ctxClient, cancelClient := context.WithCancel(context.Background()) ctxClient, cancelClient := context.WithCancel(context.Background())
defer cancelClient() defer cancelClient()
tlsConfig, err = client.GetClientTLSConfig(ctxClient, sign, pk) tlsConfig, err = client.GetClientTLSConfig(ctxClient, sign, pk)
if err != nil {
panic(err)
}
// An http.Client will need to create a transport first // An http.Client will need to create a transport first
_ = &http.Client{ _ = &http.Client{
Transport: &http.Transport{ Transport: &http.Transport{
@ -127,6 +130,9 @@ func main() {
ctxTransport, cancelTransport := context.WithCancel(context.Background()) ctxTransport, cancelTransport := context.WithCancel(context.Background())
defer cancelTransport() defer cancelTransport()
tr, err = client.Transport(ctxTransport, sign, pk) tr, err = client.Transport(ctxTransport, sign, pk)
if err != nil {
panic(err)
}
// And http.Client will use the transport like // And http.Client will use the transport like
_ = &http.Client{ _ = &http.Client{
Transport: tr, Transport: tr,

Loading…
Cancel
Save