npx claudepluginhub jamesprial/prial-plugins --plugin golang-workflowThis skill uses the workspace's default tool permissions.
Extract common test logic into helper functions with t.Helper().
Writes, reviews, and improves Go tests using table-driven tests, subtests, parallel tests, helpers, test doubles, cmp.Diff assertions, and Google/Uber style guides.
Guides Golang testing with stretchr/testify: assert/require assertions, mock expectations/matchers, suite lifecycles, advanced patterns like Eventually/JSONEq. Activates on Go test files importing testify.
Reviews Go test code for table-driven tests, assertions, parallel execution, cleanup, mocking, benchmarks, fuzzing, httptest, and coverage patterns in *_test.go files.
Share bugs, ideas, or general feedback.
Extract common test logic into helper functions with t.Helper().
func assertEqual(t *testing.T, got, want interface{}) {
t.Helper() // Reports caller line, not helper line
if got != want {
t.Errorf("got %v, want %v", got, want)
}
}
func assertNoError(t *testing.T, err error) {
t.Helper()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
}
func Test_Process(t *testing.T) {
result, err := Process("input")
assertNoError(t, err)
assertEqual(t, result, "expected")
}
Why:
func assertEqual(t *testing.T, got, want interface{}) {
// Missing t.Helper()
if got != want {
t.Errorf("got %v, want %v", got, want)
}
}
Problems: