npx claudepluginhub jamesprial/prial-plugins --plugin golang-workflowThis skill uses the workspace's default tool permissions.
Use t.Run to group related tests and enable selective execution.
Implements idiomatic Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and coverage. Guides TDD workflow for new functions, existing code, and performance.
Provides Go testing patterns like table-driven tests, subtests, benchmarks, fuzz tests, and coverage following idiomatic TDD practices. Use for new functions, coverage, or TDD workflows.
Provides Go testing patterns with TDD: table-driven tests, subtests, benchmarks, fuzzing, and coverage for reliable, idiomatic tests.
Share bugs, ideas, or general feedback.
Use t.Run to group related tests and enable selective execution.
func Test_User_Validation(t *testing.T) {
t.Run("valid email", func(t *testing.T) {
user := User{Email: "test@example.com"}
if err := user.Validate(); err != nil {
t.Errorf("expected valid, got error: %v", err)
}
})
t.Run("invalid email", func(t *testing.T) {
user := User{Email: "invalid"}
if err := user.Validate(); err == nil {
t.Error("expected error, got nil")
}
})
t.Run("empty email", func(t *testing.T) {
user := User{Email: ""}
if err := user.Validate(); err == nil {
t.Error("expected error, got nil")
}
})
}
Run specific subtest:
go test -run Test_User_Validation/invalid_email
Why:
func Test_User_ValidEmail(t *testing.T) { /* ... */ }
func Test_User_InvalidEmail(t *testing.T) { /* ... */ }
func Test_User_EmptyEmail(t *testing.T) { /* ... */ }
Problems: