Skip to content

Commit 684c598

Browse files
chore: fix new govet issues (#2678)
Co-authored-by: James Thomas <[email protected]>
1 parent 09bddd6 commit 684c598

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+32
-55
lines changed

cmd/spicedb/migrate_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

cmd/spicedb/restgateway_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

cmd/spicedb/schemawatch_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

cmd/spicedb/serve_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

cmd/spicedb/servetesting_integration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

cmd/spicedb/servetesting_race_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build docker && image
2-
// +build docker,image
32

43
package main
54

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ require (
211211
github.com/butuzov/mirror v1.3.0 // indirect
212212
github.com/catenacyber/perfsprint v0.9.1 // indirect
213213
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
214+
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
214215
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
215216
github.com/charithe/durationcheck v0.0.10 // indirect
216217
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,8 @@ github.com/ccoveille/go-safecast v1.6.1 h1:Nb9WMDR8PqhnKCVs2sCB+OqhohwO5qaXtCviZ
15341534
github.com/ccoveille/go-safecast v1.6.1/go.mod h1:QqwNjxQ7DAqY0C721OIO9InMk9zCwcsO7tnRuHytad8=
15351535
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
15361536
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
1537+
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
1538+
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
15371539
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
15381540
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
15391541
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=

internal/datastore/common/relationships.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"database/sql"
66
"errors"
77
"fmt"
8+
"strings"
89
"time"
910

1011
"go.opentelemetry.io/otel/attribute"
@@ -71,14 +72,16 @@ func runExplainIfNecessary[R Rows](ctx context.Context, builder RelationshipsQue
7172
}
7273

7374
err = tx.QueryFunc(ctx, func(ctx context.Context, rows R) error {
74-
explainString := ""
75+
var explainBuilder strings.Builder
7576
for rows.Next() {
7677
var explain string
7778
if err := rows.Scan(&explain); err != nil {
7879
return fmt.Errorf(errUnableToQueryRels, fmt.Errorf("scan err: %w", err))
7980
}
80-
explainString += explain + "\n"
81+
explainBuilder.WriteString(explain + "\n")
8182
}
83+
84+
explainString := explainBuilder.String()
8285
if explainString == "" {
8386
return errors.New("received empty explain")
8487
}

internal/datastore/crdb/crdb_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build ci && docker
2-
// +build ci,docker
32

43
package crdb
54

0 commit comments

Comments
 (0)