diff options
| -rw-r--r-- | cmd/gt/cli_test.go | 3 | ||||
| -rw-r--r-- | internal/repl/concurrent_test.go | 6 | ||||
| -rw-r--r-- | internal/rpn/rpn_parse.go | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/cmd/gt/cli_test.go b/cmd/gt/cli_test.go index e725de9..46d9e82 100644 --- a/cmd/gt/cli_test.go +++ b/cmd/gt/cli_test.go @@ -27,7 +27,8 @@ func buildBinary(t *testing.T) string { } t.Cleanup(func() { - os.Remove("/tmp/gt-test") + // Explicitly ignore error return from os.Remove during cleanup + _ = os.Remove("/tmp/gt-test") }) return "/tmp/gt-test" diff --git a/internal/repl/concurrent_test.go b/internal/repl/concurrent_test.go index 14c82ef..d07b9ce 100644 --- a/internal/repl/concurrent_test.go +++ b/internal/repl/concurrent_test.go @@ -25,7 +25,8 @@ func TestConcurrentRPN(t *testing.T) { wg.Add(1) go func(id int) { defer wg.Done() - runRPN("3 4 +") + // Ignore error return as the expression "3 4 +" should always succeed + _, _ = runRPN("3 4 +") }(i) } wg.Wait() @@ -55,7 +56,8 @@ func TestConcurrentExecutorAndRPN(t *testing.T) { }(i) go func(id int) { defer wg.Done() - runRPN("3 4 +") + // Ignore error return as the expression "3 4 +" should always succeed + _, _ = runRPN("3 4 +") }(i) } wg.Wait() diff --git a/internal/rpn/rpn_parse.go b/internal/rpn/rpn_parse.go index 48abb15..bf9a613 100644 --- a/internal/rpn/rpn_parse.go +++ b/internal/rpn/rpn_parse.go @@ -445,7 +445,7 @@ func (r *RPN) handleOperator(stack *Stack, token string, tokenIndex int) (string if len(token) > 0 && token[0] == ':' { symbolName := token[1:] // Remove the leading : if symbolName == "" { - return "", fmt.Errorf("symbol name cannot be empty after :") + return "", fmt.Errorf("symbol name cannot be empty after colon") } // Only push as symbol if the remaining part is a valid identifier // This prevents := and =: from being treated as : followed by = operator |
