Skip to content

Commit

Permalink
fix lint issues (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 authored Aug 31, 2023
1 parent 199850f commit 0a52da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ distribution of workload.
The following code snippet shows just one connection.

```go
conn, err := grpc.Dial("localhost:9080", grpc.WithInsecure())
conn, err := grpc.Dial("localhost:9080", grpc.WithTransportCredentials(insecure.NewCredentials()))
// Check error
defer conn.Close()
dgraphClient := dgo.NewDgraphClient(api.NewDgraphClient(conn))
Expand All @@ -74,7 +74,7 @@ The client can be configured to use gRPC compression:

```go
dialOpts := append([]grpc.DialOption{},
grpc.WithInsecure(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
d, err := grpc.Dial("localhost:9080", dialOpts...)
```
Expand Down
3 changes: 2 additions & 1 deletion examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/dgraph-io/dgo/v230"
"github.com/dgraph-io/dgo/v230/protos/api"
Expand All @@ -37,7 +38,7 @@ const (
type CancelFunc func()

func getDgraphClient() (*dgo.Dgraph, CancelFunc) {
conn, err := grpc.Dial(dgraphAddress, grpc.WithInsecure())
conn, err := grpc.Dial(dgraphAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal("While trying to dial gRPC")
}
Expand Down

0 comments on commit 0a52da2

Please sign in to comment.