From 184ceafcec442254c2470c9eb5ca3a8efef723ac Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Fri, 12 May 2023 15:44:02 -0400 Subject: [PATCH] all: address linter warnings --- internal/middleware/streamtimeout/streamtimeout.go | 2 +- pkg/datastore/test/pagination.go | 4 ++-- pkg/validationfile/loader.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/middleware/streamtimeout/streamtimeout.go b/internal/middleware/streamtimeout/streamtimeout.go index 8a22bb0286..9ff90fc5c1 100644 --- a/internal/middleware/streamtimeout/streamtimeout.go +++ b/internal/middleware/streamtimeout/streamtimeout.go @@ -37,7 +37,7 @@ func (s *sendWrapper) Context() context.Context { return s.ctx } -func (s *sendWrapper) SetTrailer(trailer metadata.MD) { +func (s *sendWrapper) SetTrailer(_ metadata.MD) { s.timer.Stop() } diff --git a/pkg/datastore/test/pagination.go b/pkg/datastore/test/pagination.go index f1eb4bac6a..ad644f03b6 100644 --- a/pkg/datastore/test/pagination.go +++ b/pkg/datastore/test/pagination.go @@ -145,7 +145,7 @@ type ( iterator func(ctx context.Context, reader datastore.Reader, limit uint64, cursor options.Cursor) (datastore.RelationshipIterator, error) ) -func forwardIterator(resourceType string, ordering options.SortOrder) iterator { +func forwardIterator(resourceType string, _ options.SortOrder) iterator { return func(ctx context.Context, reader datastore.Reader, limit uint64, cursor options.Cursor) (datastore.RelationshipIterator, error) { return reader.QueryRelationships(ctx, datastore.RelationshipsFilter{ ResourceType: resourceType, @@ -153,7 +153,7 @@ func forwardIterator(resourceType string, ordering options.SortOrder) iterator { } } -func reverseIterator(subjectType string, ordering options.SortOrder) iterator { +func reverseIterator(subjectType string, _ options.SortOrder) iterator { return func(ctx context.Context, reader datastore.Reader, limit uint64, cursor options.Cursor) (datastore.RelationshipIterator, error) { return reader.ReverseQueryRelationships(ctx, datastore.SubjectsFilter{ SubjectType: subjectType, diff --git a/pkg/validationfile/loader.go b/pkg/validationfile/loader.go index e06fb96dd5..a8c665af6d 100644 --- a/pkg/validationfile/loader.go +++ b/pkg/validationfile/loader.go @@ -6,7 +6,6 @@ import ( "os" v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" - "github.com/authzed/spicedb/pkg/util" log "github.com/authzed/spicedb/internal/logging" dsctx "github.com/authzed/spicedb/internal/middleware/datastore" @@ -15,6 +14,7 @@ import ( "github.com/authzed/spicedb/pkg/datastore" core "github.com/authzed/spicedb/pkg/proto/core/v1" "github.com/authzed/spicedb/pkg/tuple" + "github.com/authzed/spicedb/pkg/util" ) // PopulatedValidationFile contains the fully parsed information from a validation file.