Skip to content

Commit

Permalink
mute several staticcheck errors
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Jun 2, 2024
1 parent 570d60e commit 3b9b9ed
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go/vt/grpcclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func DialContext(ctx context.Context, target string, failFast FailFast, opts ...

newopts = append(newopts, interceptors()...)

return grpc.DialContext(ctx, target, newopts...)
return grpc.DialContext(ctx, target, newopts...) // nolint:staticcheck
}

func interceptors() []grpc.DialOption {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/grpcoptionaltls/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestOptionalTLS(t *testing.T) {
testFunc := func(t *testing.T, dialOpt grpc.DialOption) {
ctx, cancel := context.WithTimeout(testCtx, 5*time.Second)
defer cancel()
conn, err := grpc.DialContext(ctx, addr, dialOpt)
conn, err := grpc.DialContext(ctx, addr, dialOpt) // nolint:staticcheck
if err != nil {
t.Fatalf("failed to connect to the server %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/topo/etcd2topo/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func NewServerWithOpts(serverAddr, root, certPath, keyPath, caPath string) (*Ser
config := clientv3.Config{
Endpoints: strings.Split(serverAddr, ","),
DialTimeout: 5 * time.Second,
DialOptions: []grpc.DialOption{grpc.WithBlock()},
DialOptions: []grpc.DialOption{grpc.WithBlock()}, // nolint:staticcheck
}

tlscfg, err := newTLSConfig(certPath, keyPath, caPath)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtadmin/grpcserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestServer(t *testing.T) {
}
close(readyCh)

conn, err := grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock())
conn, err := grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) // nolint:staticcheck
assert.NoError(t, err)

defer conn.Close()
Expand Down
4 changes: 2 additions & 2 deletions go/vtbench/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var vtgateConns = map[string]*vtgateconn.VTGateConn{}
func (c *grpcVtgateConn) connect(ctx context.Context, cp ConnParams) error {
withBlockOnce.Do(func() {
grpcclient.RegisterGRPCDialOptions(func(opts []grpc.DialOption) ([]grpc.DialOption, error) {
return append(opts, grpc.WithBlock()), nil
return append(opts, grpc.WithBlock()), nil // nolint:staticcheck
})
})

Expand Down Expand Up @@ -119,7 +119,7 @@ var vttabletConns = map[string]queryservice.QueryService{}
func (c *grpcVttabletConn) connect(ctx context.Context, cp ConnParams) error {
withBlockOnce.Do(func() {
grpcclient.RegisterGRPCDialOptions(func(opts []grpc.DialOption) ([]grpc.DialOption, error) {
return append(opts, grpc.WithBlock()), nil
return append(opts, grpc.WithBlock()), nil // nolint:staticcheck
})
})

Expand Down

0 comments on commit 3b9b9ed

Please sign in to comment.