Skip to content

docs(codec): remove factory from ProtoCodec#108

Merged
Suhaibinator merged 2 commits intomainfrom
removeFactory
Mar 9, 2026
Merged

docs(codec): remove factory from ProtoCodec#108
Suhaibinator merged 2 commits intomainfrom
removeFactory

Conversation

@Suhaibinator
Copy link
Copy Markdown
Owner

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 to ProtoRequestFactory and factory functions.

This aligns documentation with current API behavior and clarifies no factory is needed anymore.

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
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.49%. Comparing base (41d9e05) to head (c4688b3).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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]()`.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@Suhaibinator Suhaibinator merged commit e77991d into main Mar 9, 2026
11 checks passed
@Suhaibinator Suhaibinator deleted the removeFactory branch March 9, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant