Skip to content

Commit f82102c

Browse files
committed
fix: replace deprecated grpc.DialContext and WithBlock with grpc.NewClient
Fixes staticcheck SA1019 lint warnings.
1 parent 905cee3 commit f82102c

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

internal/client/client.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ func SetMetadata(ctx context.Context, cfg Config, namespaceID string) context.Co
4646
}
4747

4848
func createConnection(ctx context.Context, cfg Config) (*grpc.ClientConn, error) {
49-
opts := []grpc.DialOption{
49+
return grpc.NewClient(cfg.Host,
5050
grpc.WithTransportCredentials(insecure.NewCredentials()),
51-
grpc.WithBlock(),
52-
}
53-
54-
return grpc.DialContext(ctx, cfg.Host, opts...)
51+
)
5552
}

0 commit comments

Comments
 (0)