docs(codec): remove factory from ProtoCodec#108
Conversation
Update README and docs to reflect the new `NewProtoCodec[T, U](prototype T)` constructor signature, replacing references to `ProtoRequestFactory` and factory functions with a non-nil request prototype example. This aligns documentation with current API behavior and clarifies that the prototype is used to allocate fresh request messages for unmarshaling without reflection.docs(codec): switch ProtoCodec docs from factory to prototype Update README and docs to reflect the new `NewProtoCodec[T, U](prototype T)` constructor signature, replacing references to `ProtoRequestFactory` and factory functions with a non-nil request prototype example. This aligns documentation with current API behavior and clarifies that the prototype is used to allocate fresh request messages for unmarshaling without reflection.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
=======================================
Coverage 97.48% 97.49%
=======================================
Files 18 18
Lines 1872 1875 +3
=======================================
+ Hits 1825 1828 +3
Misses 35 35
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Simplify `ProtoCodec` construction by inferring the request message type from generic `T` instead of requiring a non-nil prototype parameter. This reduces boilerplate while still allowing fresh request allocation without reflection. Also update README/docs/examples to reflect the new API and bump GitHub Actions Go versions to `1.26.1` for tests, linting, benchmarks, and example builds. BREAKING CHANGE: `codec.NewProtoCodec[T, U](prototype T)` is now `codec.NewProtoCodec[T, U]()`.feat(codec)!: remove prototype arg from NewProtoCodec Simplify `ProtoCodec` construction by inferring the request message type from generic `T` instead of requiring a non-nil prototype parameter. This reduces boilerplate while still allowing fresh request allocation without reflection. Also update README/docs/examples to reflect the new API and bump GitHub Actions Go versions to `1.26.1` for tests, linting, benchmarks, and example builds. BREAKING CHANGE: `codec.NewProtoCodec[T, U](prototype T)` is now `codec.NewProtoCodec[T, U]()`.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35e963758b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| module github.com/Suhaibinator/SRouter | ||
|
|
||
| go 1.24.0 | ||
| go 1.26.0 |
There was a problem hiding this comment.
Keep go.mod language version aligned with CI toolchain
Raising the module directive to go 1.26.0 breaks this repository’s own CI configuration, which is still pinned to Go 1.24 in .github/workflows/tests.yml (go-version: '1.24' in the test/lint/build/benchmark/examples jobs). With this commit, those jobs fail before running tests because go exits with go.mod requires go >= 1.26.0, so builds and checks are blocked until the workflow toolchain is upgraded in the same change.
Useful? React with 👍 / 👎.
Update README and docs to reflect the new
NewProtoCodec[T, U]()constructor signature.This aligns documentation with current API behavior and clarifies that the prototype is used to allocate fresh request messages for unmarshaling without reflection.
Update README and docs to reflect the new
NewProtoCodec[T, U]()constructor signature, removing references toProtoRequestFactoryand factory functions.This aligns documentation with current API behavior and clarifies no factory is needed anymore.