This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/cursor/rules/golang-errors.mdc
T
2026-07-26 11:42:17 +02:00

11 lines
306 B
Plaintext

---
alwaysApply: false
---
# Error Handling Rules
- Always return errors instead of panicking (except in `main` or tests).
- Wrap errors with `%w` when using `fmt.Errorf` for context.
- Do not ignore errors; handle or log them explicitly.
- Use sentinel errors or `errors.Is` / `errors.As` for checking.