From 5badf16145a40cbc7f2bbbcbf683360f41014298 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Wed, 8 Nov 2023 11:45:56 -0500 Subject: [PATCH] chore(lint): fix lint failures --- pkg/go/transformer/dsltojson.go | 2 +- pkg/go/transformer/dsltojson_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/go/transformer/dsltojson.go b/pkg/go/transformer/dsltojson.go index 9207b77d..88bfdf5f 100644 --- a/pkg/go/transformer/dsltojson.go +++ b/pkg/go/transformer/dsltojson.go @@ -270,7 +270,7 @@ func (l *OpenFgaDslListener) ExitRelationDefTypeRestriction(ctx *parser.Relation } func (l *OpenFgaDslListener) ExitRelationDefRewrite(ctx *parser.RelationDefRewriteContext) { - partialRewrite := &pb.Userset{} + var partialRewrite *pb.Userset computedUserset := &pb.ObjectRelation{ Relation: ctx.GetRewriteComputedusersetName().GetText(), } diff --git a/pkg/go/transformer/dsltojson_test.go b/pkg/go/transformer/dsltojson_test.go index 4429bbca..a72e621b 100644 --- a/pkg/go/transformer/dsltojson_test.go +++ b/pkg/go/transformer/dsltojson_test.go @@ -57,7 +57,7 @@ func TestDSLToJSONTransformerForSyntaxErrorCases(t *testing.T) { // we care that it errors for syntax errors more than we care about the error messages matching, // esp. in Go as we are not building a language server on top of the returned errors yet // actual matching error strings is safe to ignore for now - //require.EqualErrorf(t, err, testCase.GetErrorString(), "") + // require.EqualErrorf(t, err, testCase.GetErrorString(), "") } }) }