Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Sep 8, 2023
1 parent 801cf8a commit 5375a2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions balancer/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func NewApp(balancer *balancerPkg.Balancer, cfg config.Balancer) (*App, error) {
}
shardClusters := map[int]*hasql.Cluster{}

for id, shard := range *shards {
for id := range *shards {
shardClusters[id], err = balancerPkg.NewCluster(
shard.Hosts,
(*shards)[id].Hosts,
cfg.InstallationDBName,
cfg.InstallationUserName,
cfg.InstallationPassword,
Expand Down
4 changes: 2 additions & 2 deletions pkg/coord/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ func (a *adapter) DropShardingRuleAll(ctx context.Context) ([]*shrule.ShardingRu
}

c := proto.NewShardingRulesServiceClient(a.conn)
c.DropShardingRules(ctx, &proto.DropShardingRuleRequest{Id: ids})
return rules, nil
_, err = c.DropShardingRules(ctx, &proto.DropShardingRuleRequest{Id: ids})
return rules, err
}

func (a *adapter) ListShardingRules(ctx context.Context) ([]*shrule.ShardingRule, error) {
Expand Down
4 changes: 2 additions & 2 deletions router/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (l *Local) proxyProc(ctx context.Context, tstmt spqrparser.Statement, cli *
if err != nil {
return err
}
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure())
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure()) //nolint:all
if err != nil {
return err
}
Expand All @@ -102,7 +102,7 @@ func (l *Local) proxyProc(ctx context.Context, tstmt spqrparser.Statement, cli *
if err != nil {
return err
}
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure())
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure()) //nolint:all
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion test/feature/spqr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func (tctx *testContext) stepHostIsStopped(service string) error {
return false
}
addr := strings.Split(output, "\n")[1]
conn, err := grpc.Dial(addr, grpc.WithInsecure())
conn, err := grpc.Dial(addr, grpc.WithInsecure()) //nolint:all
if err != nil {
return false
}
Expand Down

0 comments on commit 5375a2e

Please sign in to comment.