What it does
A Cursor rules file that sets how the AI writes Go code. It covers error handling, naming, interfaces, concurrency and table-driven tests, and lists patterns to avoid such as ignoring errors or using global mutable state.
Use cases
- 01Wrap errors with context in new Go code
- 02Keep goroutines tied to a context and a stop condition
- 03Generate table-driven tests for existing functions