Repository navigation
Conversation
Implemented by the Weave Autoloop, attempt 1 (execution exe_b61112dcc128).
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 83.60% 83.88% +0.28%
==========================================
Files 14 14
Lines 500 509 +9
==========================================
+ Hits 418 427 +9
Misses 63 63
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Weave review: approved (execution
Two small gaps, neither of which blocks approval:
|
Work item WI-004 of work package WP-001 (GitHub issues).
`response_helpers.go` has `OK`, `OKWithMeta`, and `Created`, but no `Accepted` (202) or `NoContent` (204) — both common for async-job-style and delete/update-with-empty-body endpoints. `ReplyBuilder` (the fluent path) has the same gap: `OK`/`Created` methods exist, no `Accepted`/`NoContent`.
Current workaround is the generic `Respond(data).Status(http.StatusAccepted).Write(w)` / `Respondany.Status(http.StatusNoContent).Write(w)`, which works but is exactly the "low-level escape hatch" the direct helpers exist to avoid.
Requested:
```go
func Accepted[T any](w http.ResponseWriter, data T)
func NoContent(w http.ResponseWriter)
```
plus `ReplyBuilder.Accepted`/`ReplyBuilder.NoContent` for the header/meta-configured path.
Implemented by the Weave Autoloop, attempt 1, execution
exe_b61112dcc128.Changed files:
response_builder.goresponse_helpers.goresponse_helpers_test.go