ai:prompt:review-pr-golang
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| ai:prompt:review-pr-golang [2026/06/11 14:14] – phong2018 | ai:prompt:review-pr-golang [2026/06/11 14:20] (current) – phong2018 | ||
|---|---|---|---|
| Line 101: | Line 101: | ||
| - [ ] Domain sentinel errors live in `domain/ | - [ ] Domain sentinel errors live in `domain/ | ||
| - | - [ ] Infrastructure returns domain sentinels — never `apperror` types directly (e.g. `sql.ErrNoRows` → `domainModel.ErrTodoNotFound`). | ||
| - [ ] Presentation middleware maps domain sentinels → HTTP codes via `errors.Is` / `errors.As` — this mapping lives only in middleware, never in usecase or infrastructure. | - [ ] Presentation middleware maps domain sentinels → HTTP codes via `errors.Is` / `errors.As` — this mapping lives only in middleware, never in usecase or infrastructure. | ||
| - [ ] `AppError.Err` (internal error) must never be serialized to the client response. | - [ ] `AppError.Err` (internal error) must never be serialized to the client response. | ||
| - | - [ ] No raw SQL errors, gRPC status codes, or stack traces in HTTP responses. | ||
| --- | --- | ||
| Line 136: | Line 134: | ||
| - [ ] Define interfaces in the **consumer package**, not in the implementor' | - [ ] Define interfaces in the **consumer package**, not in the implementor' | ||
| + | - **Exception for this project:** `TodoRepository`, | ||
| - [ ] Keep interfaces minimal — only the methods the consumer actually calls. | - [ ] Keep interfaces minimal — only the methods the consumer actually calls. | ||
| - [ ] Flag any interface with 5+ methods as a potential fat interface violation. | - [ ] Flag any interface with 5+ methods as a potential fat interface violation. | ||
ai/prompt/review-pr-golang.1781187274.txt.gz · Last modified: by phong2018
