[Feature]: generic Conn context #443
Labels
breaking changes
enhancement
New feature or request
needs investigation
new feature
pending development
Requested PR owner to improve code and waiting for the result
proposal
Proposal for this repo
Milestone
Description of new feature
Would be great if the
Conn
was a generic interface.Like:
This'll allow users avoid many conversions (and many small allocs) when context used.
This is a breaking change, but in soft manner. Since you can maintain the
ConnG
and theConn
separately and theConn
will be almost identical to currentConn
that useinterface{}
to a context.You can get incompatibility here, but mostly in advanced use-cases when some tool rely on the
Conn
internal representation.Also, the change will require the golang version bump to
1.18
. You can also maintain compatibility if you leave the originalConn
implementation and guard it via build tags.Scenarios for new feature
Conn
and nothing should changes for them.interface{}
asContext
. Same as above.interface{}
to the own type.Breaking changes or not?
Yes
Code snippets (optional)
No response
Alternatives for new feature
None.
Additional context (optional)
Good example of same change can be found here.
The text was updated successfully, but these errors were encountered: