Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherednik committed Nov 1, 2024
1 parent 65a8374 commit 4d57263
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/table/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (c *Client) Do(ctx context.Context, op table.Operation, opts ...table.Optio

err := do(ctx, c.pool, c.config, op, func(err error) {
attempts++
}, config.preferredNodeID, config.RetryOptions...)
}, config.PreferredNodeID, config.RetryOptions...)
if err != nil {
return xerrors.WithStackTrace(err)
}
Expand Down Expand Up @@ -270,7 +270,7 @@ func (c *Client) DoTx(ctx context.Context, op table.TxOperation, opts ...table.O
}

return nil
}, config.preferredNodeID, config.RetryOptions...)
}, config.PreferredNodeID, config.RetryOptions...)
}

func (c *Client) BulkUpsert(
Expand Down
6 changes: 3 additions & 3 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ type Options struct {
TxCommitOptions []options.CommitTransactionOption
RetryOptions []retry.Option
Trace *trace.Table
preferredNodeID uint32
PreferredNodeID uint32
}

type Option interface {
Expand All @@ -517,7 +517,7 @@ type SessionOption struct {
}

func (o SessionOption) ApplyTableOption(opts *Options) {
opts.preferredNodeID = o.preferredNodeID
opts.PreferredNodeID = o.preferredNodeID
}

var _ Option = labelOption("")
Expand Down Expand Up @@ -557,7 +557,7 @@ func WithIdempotent() retryOptionsOption {
return []retry.Option{retry.WithIdempotent(true)}
}

func WithpreferredNodeID(nodeId uint32) SessionOption {
func WithPreferredNodeID(nodeId uint32) SessionOption {

Check warning on line 560 in table/table.go

View workflow job for this annotation

GitHub Actions / golangci-lint

var-naming: func parameter nodeId should be nodeID (revive)
return SessionOption{preferredNodeID: nodeId}
}

Expand Down

0 comments on commit 4d57263

Please sign in to comment.