From 48922e21d1e1647957ea7570d2b4c1fbf81283f5 Mon Sep 17 00:00:00 2001 From: Jesse Simpson Date: Tue, 18 Mar 2025 20:39:06 -0400 Subject: [PATCH] refactor: use struct equality instead of comparing each composition Signed-off-by: Jesse Simpson --- pkg/engine/engine.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index fee26490f..7b0f87feb 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -399,9 +399,7 @@ func reformatExecErrorMsg(filename string, err error) error { } if len(fileLocations) > 0 { lastErr := fileLocations[len(fileLocations)-1] - if lastErr.message == traceable.message && - lastErr.location == traceable.location && - lastErr.executedFunction == traceable.executedFunction { + if lastErr == traceable { current = errors.Unwrap(current) continue }