Skip to content

Commit

Permalink
enabled inamedparam
Browse files Browse the repository at this point in the history
  • Loading branch information
size12 committed Jan 24, 2024
1 parent 693fdbb commit d785b4f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ linters:
- gomnd
- gomoddirectives
- ifshort
- inamedparam
- interfacebloat
- interfacer
- ireturn
Expand Down
2 changes: 1 addition & 1 deletion credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Credentials is an interface of YDB credentials required for connect with YDB
type Credentials interface {
// Token must return actual token or error
Token(context.Context) (string, error)
Token(ctx context.Context) (string, error)
}

// NewAccessTokenCredentials makes access token credentials object
Expand Down
4 changes: 2 additions & 2 deletions internal/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ type Conn interface {
Ping(ctx context.Context) error
IsState(states ...State) bool
GetState() State
SetState(context.Context, State) State
Unban(context.Context) State
SetState(ctx context.Context, state State) State
Unban(ctx context.Context) State
}

type conn struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
// Credentials is an interface of YDB credentials required for connect with YDB
type Credentials interface {
// Token must return actual token or error
Token(context.Context) (string, error)
Token(ctx context.Context) (string, error)
}
4 changes: 2 additions & 2 deletions internal/table/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (
// SessionProvider is the interface that holds session lifecycle logic.
type SessionProvider interface {
// Get returns alive idle session or creates new one.
Get(context.Context) (*session, error)
Get(ctx context.Context) (*session, error)

// Put takes no longer needed session for reuse or deletion depending
// on implementation.
// Put must be fast, if necessary must be async
Put(context.Context, *session) (err error)
Put(ctx context.Context, s *session) (err error)
}

func do(
Expand Down
4 changes: 2 additions & 2 deletions scheme/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ func permissions(p Permissions) *Ydb_Scheme.Permissions {
}

type permissionsDesc interface {
SetClear(bool)
AppendAction(*Ydb_Scheme.PermissionsAction)
SetClear(clear bool)
AppendAction(action *Ydb_Scheme.PermissionsAction)
}

type PermissionsOption func(permissionsDesc)
Expand Down
8 changes: 4 additions & 4 deletions table/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,14 @@ func WithMaxPartitionsCount(maxPartitionsCount uint64) PartitioningSettingsOptio
type (
DropTableDesc Ydb_Table.DropTableRequest
DropTableOption interface {
ApplyDropTableOption(*DropTableDesc)
ApplyDropTableOption(desc *DropTableDesc)
}
)

type (
AlterTableDesc Ydb_Table.AlterTableRequest
AlterTableOption interface {
ApplyAlterTableOption(*AlterTableDesc, *allocator.Allocator)
ApplyAlterTableOption(desc *AlterTableDesc, a *allocator.Allocator)
}
)

Expand Down Expand Up @@ -1017,12 +1017,12 @@ var (
type (
ReadRowsDesc Ydb_Table.ReadRowsRequest
ReadRowsOption interface {
ApplyReadRowsOption(*ReadRowsDesc, *allocator.Allocator)
ApplyReadRowsOption(desc *ReadRowsDesc, a *allocator.Allocator)
}

ReadTableDesc Ydb_Table.ReadTableRequest
ReadTableOption interface {
ApplyReadTableOption(*ReadTableDesc, *allocator.Allocator)
ApplyReadTableOption(desc *ReadTableDesc, a *allocator.Allocator)
}

readColumnsOption []string
Expand Down
4 changes: 2 additions & 2 deletions tests/slo/internal/workers/workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

type ReadWriter interface {
Read(context.Context, generator.RowID) (_ generator.Row, attempts int, err error)
Write(context.Context, generator.Row) (attempts int, err error)
Read(ctx context.Context, rowID generator.RowID) (_ generator.Row, attempts int, err error)
Write(ctx context.Context, row generator.Row) (attempts int, err error)
}

type Workers struct {
Expand Down

0 comments on commit d785b4f

Please sign in to comment.