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(), "") } }) }