go test
0.0% Savings
0 Commands
0 Tokens saved
2 Tests
Install
Safety checks passed
Filter definition
command = "go test"
strip_ansi = true
collapse_empty_lines = true
skip = [
"^=== RUN ",
"^=== PAUSE ",
"^=== CONT ",
"^--- PASS:",
"^\\s+--- PASS:",
"^coverage: \\d+\\.\\d+% of statements",
"^\\?\\s+.+\\[no test files\\]",
]
keep = [
"--- FAIL",
"\\.go:\\d+",
"^FAIL",
"^ok\\s",
"^PASS$",
]
[on_success]
output = "{output}"
[on_failure]
tail = 60
Examples
failure shows failing test details
~101 tokens → ~74 tokens
(27% saved)
Raw output
=== RUN TestGetUser
=== RUN TestGetUser/success
handler_test.go:45: expected status 200, got 500
handler_test.go:46: response body: {"error":"internal server error"}
--- FAIL: TestGetUser/success (0.00s)
--- FAIL: TestGetUser (0.00s)
=== RUN TestListUsers
--- PASS: TestListUsers (0.02s)
FAIL
FAIL github.com/gw/api/functions/get-user 0.125s
ok github.com/gw/api/functions/list-users 0.089s Filtered output
handler_test.go:45: expected status 200, got 500
handler_test.go:46: response body: {"error":"internal server error"}
--- FAIL: TestGetUser/success (0.00s)
--- FAIL: TestGetUser (0.00s)
FAIL
FAIL github.com/gw/api/functions/get-user 0.125s
ok github.com/gw/api/functions/list-users 0.089s success filters RUN and PASS lines, keeps ok summary
~123 tokens → ~26 tokens
(79% saved)
Raw output
=== RUN TestGetUser === RUN TestGetUser/success === RUN TestGetUser/not_found === PAUSE TestGetUser/not_found === CONT TestGetUser/not_found --- PASS: TestGetUser/success (0.00s) --- PASS: TestGetUser/not_found (0.01s) --- PASS: TestGetUser (0.01s) === RUN TestListUsers --- PASS: TestListUsers (0.02s) PASS coverage: 85.2% of statements ok github.com/gw/api/functions/get-user 0.125s ok github.com/gw/api/functions/list-users 0.089s ? github.com/gw/api/pkg/utils [no test files]
Filtered output
PASS ok github.com/gw/api/functions/get-user 0.125s ok github.com/gw/api/functions/list-users 0.089s
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.Browse all filters