npx claudepluginhub zate/cc-plugins --plugin devloopThis skill uses the workspace's default tool permissions.
Idiomatic Go patterns for Go 1.21+.
Provides idiomatic Go patterns and best practices for simplicity, zero values, interfaces, error handling. Useful for writing, reviewing, refactoring, designing Go code.
Provides idiomatic Go patterns and best practices for writing, reviewing, refactoring Go code, and designing packages. Covers simplicity, zero values, interfaces, and error handling.
Provides idiomatic Go patterns for concurrency (errgroup, channels, worker pools), error handling (sentinels, wrapping), testing (table-driven), modules, and workspaces.
Share bugs, ideas, or general feedback.
Idiomatic Go patterns for Go 1.21+.
if err != nil {
return fmt.Errorf("failed to process %s: %w", id, err)
}
Small interfaces (1-3 methods). Accept interfaces, return structs.
type Reader interface {
Read(p []byte) (n int, err error)
}
tests := []struct{
name string
input, want int
}{
{"positive", 2, 3},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Fn(tt.input); got != tt.want {
t.Errorf("got %d, want %d", got, tt.want)
}
})
}
Always propagate context for cancellation:
func work(ctx context.Context) error {
select {
case <-ctx.Done():
return ctx.Err()
default:
// do work
}
}
f, err := os.Open(path)
if err != nil { return err }
defer f.Close()