Browse Source

Fix lint errors in examples.

Mariano Cano 8 years ago
parent
commit
89fb49c6d7
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/basic-client/client.go

+ 6 - 0
examples/basic-client/client.go

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