Skip to content

Commit 6b4c967

Browse files
authored
Merge pull request #1012 from size12/linter
enabled inamedparam
2 parents 693fdbb + d785b4f commit 6b4c967

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ linters:
229229
- gomnd
230230
- gomoddirectives
231231
- ifshort
232-
- inamedparam
233232
- interfacebloat
234233
- interfacer
235234
- ireturn

credentials/credentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
// Credentials is an interface of YDB credentials required for connect with YDB
1010
type Credentials interface {
1111
// Token must return actual token or error
12-
Token(context.Context) (string, error)
12+
Token(ctx context.Context) (string, error)
1313
}
1414

1515
// NewAccessTokenCredentials makes access token credentials object

internal/conn/conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ type Conn interface {
4343
Ping(ctx context.Context) error
4444
IsState(states ...State) bool
4545
GetState() State
46-
SetState(context.Context, State) State
47-
Unban(context.Context) State
46+
SetState(ctx context.Context, state State) State
47+
Unban(ctx context.Context) State
4848
}
4949

5050
type conn struct {

internal/credentials/credentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import (
77
// Credentials is an interface of YDB credentials required for connect with YDB
88
type Credentials interface {
99
// Token must return actual token or error
10-
Token(context.Context) (string, error)
10+
Token(ctx context.Context) (string, error)
1111
}

internal/table/retry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import (
1414
// SessionProvider is the interface that holds session lifecycle logic.
1515
type SessionProvider interface {
1616
// Get returns alive idle session or creates new one.
17-
Get(context.Context) (*session, error)
17+
Get(ctx context.Context) (*session, error)
1818

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

2525
func do(

scheme/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ func permissions(p Permissions) *Ydb_Scheme.Permissions {
1111
}
1212

1313
type permissionsDesc interface {
14-
SetClear(bool)
15-
AppendAction(*Ydb_Scheme.PermissionsAction)
14+
SetClear(clear bool)
15+
AppendAction(action *Ydb_Scheme.PermissionsAction)
1616
}
1717

1818
type PermissionsOption func(permissionsDesc)

table/options/options.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,14 +686,14 @@ func WithMaxPartitionsCount(maxPartitionsCount uint64) PartitioningSettingsOptio
686686
type (
687687
DropTableDesc Ydb_Table.DropTableRequest
688688
DropTableOption interface {
689-
ApplyDropTableOption(*DropTableDesc)
689+
ApplyDropTableOption(desc *DropTableDesc)
690690
}
691691
)
692692

693693
type (
694694
AlterTableDesc Ydb_Table.AlterTableRequest
695695
AlterTableOption interface {
696-
ApplyAlterTableOption(*AlterTableDesc, *allocator.Allocator)
696+
ApplyAlterTableOption(desc *AlterTableDesc, a *allocator.Allocator)
697697
}
698698
)
699699

@@ -1017,12 +1017,12 @@ var (
10171017
type (
10181018
ReadRowsDesc Ydb_Table.ReadRowsRequest
10191019
ReadRowsOption interface {
1020-
ApplyReadRowsOption(*ReadRowsDesc, *allocator.Allocator)
1020+
ApplyReadRowsOption(desc *ReadRowsDesc, a *allocator.Allocator)
10211021
}
10221022

10231023
ReadTableDesc Ydb_Table.ReadTableRequest
10241024
ReadTableOption interface {
1025-
ApplyReadTableOption(*ReadTableDesc, *allocator.Allocator)
1025+
ApplyReadTableOption(desc *ReadTableDesc, a *allocator.Allocator)
10261026
}
10271027

10281028
readColumnsOption []string

tests/slo/internal/workers/workers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
)
1111

1212
type ReadWriter interface {
13-
Read(context.Context, generator.RowID) (_ generator.Row, attempts int, err error)
14-
Write(context.Context, generator.Row) (attempts int, err error)
13+
Read(ctx context.Context, rowID generator.RowID) (_ generator.Row, attempts int, err error)
14+
Write(ctx context.Context, row generator.Row) (attempts int, err error)
1515
}
1616

1717
type Workers struct {

0 commit comments

Comments
 (0)