Skip to content

Commit

Permalink
Use pointer, not object
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Nov 7, 2024
1 parent c931c39 commit a9497c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/composableschemadsl/compiler/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,9 @@ func translateImport(tctx translationContext, importNode *dslNode, names *mapz.S
globallyVisitedFiles: tctx.globallyVisitedFiles,
locallyVisitedFiles: tctx.locallyVisitedFiles,
})

var circularImportError *ErrCircularImport
if err != nil {
if errors.As(err, circularImportError) {
var circularImportError *ErrCircularImport
if errors.As(err, &circularImportError) {
// NOTE: The "%s" is an empty format string to keep with the form of ErrorWithSourcef
return nil, importNode.ErrorWithSourcef(circularImportError.filePath, "%s", circularImportError.error.Error())
}
Expand Down

0 comments on commit a9497c6

Please sign in to comment.