What problem does it solve?
This Skill ensures Go code consistency and quality by providing immediate access to best practices, reducing review cycles and errors.
Core Features & Use Cases
- Coding Standards: Adhere to the latest Go language features and project-specific
go.mod versions.
- Testing Patterns: Implement robust, readable table-style tests with clear naming conventions.
- Use Case: When writing a new Go module, this Skill guides you to write idiomatic, well-tested code from the start, saving time on refactoring and debugging.
Quick Start
func TestMyFunction(t *testing.T) {
for _, tc := range []struct {
name string
input string
expected string
}{
{
name: "case1",
input: "input1",
expected: "expected1",
},
} {
t.Run(tc.name, func(t *testing.T) {
if result := MyFunction(tc.input); result != tc.expected {
t.Errorf("expected %s, got %s", tc.expected, result)
}
})
}
}