Skip to content

Commit 0ecdab5

Browse files
committed
linting
1 parent ed52eb5 commit 0ecdab5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ func TestDBAuthzRecursive(t *testing.T) {
152152
for i := 2; i < method.Type.NumIn(); i++ {
153153
ins = append(ins, reflect.New(method.Type.In(i)).Elem())
154154
}
155-
if method.Name == "InTx" || method.Name == "Ping" || method.Name == "Wrappers" {
155+
if method.Name == "InTx" ||
156+
method.Name == "Ping" ||
157+
method.Name == "Wrappers" ||
158+
method.Name == "PGLocks" {
156159
continue
157160
}
158161
// Log the name of the last method, so if there is a panic, it is

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func (*FakeQuerier) Ping(_ context.Context) (time.Duration, error) {
339339
return 0, nil
340340
}
341341

342-
func (*FakeQuerier) PGLocks(ctx context.Context) (database.PGLocks, error) {
342+
func (*FakeQuerier) PGLocks(_ context.Context) (database.PGLocks, error) {
343343
return []database.PGLock{}, nil
344344
}
345345

coderd/database/pglocks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ func (l PGLocks) String() string {
103103
var out strings.Builder
104104
for i, lock := range l {
105105
if i != 0 {
106-
out.WriteString("\n")
106+
_, _ = out.WriteString("\n")
107107
}
108-
out.WriteString(lock.String())
108+
_, _ = out.WriteString(lock.String())
109109
}
110110
return out.String()
111111
}

0 commit comments

Comments
 (0)