From 5ab279bde32b238697c8bf0346c4c37bad78795e Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Sun, 8 Sep 2024 16:36:22 -0400 Subject: [PATCH] Fix linting --- pkg/ast/processing/find_field.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ast/processing/find_field.go b/pkg/ast/processing/find_field.go index 80c4d61..a35a38b 100644 --- a/pkg/ast/processing/find_field.go +++ b/pkg/ast/processing/find_field.go @@ -167,8 +167,8 @@ func (p *Processor) extractObjectRangesFromDesugaredObjs(desugaredObjs []*ast.De } for !tmpStack.IsEmpty() { node := tmpStack.Pop() - if _, ok := node.(*ast.DesugaredObject); ok { - desugaredObjs = append(desugaredObjs, node.(*ast.DesugaredObject)) + if castNode, ok := node.(*ast.DesugaredObject); ok { + desugaredObjs = append(desugaredObjs, castNode) break } }