-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Fluent Method Chaining for Status and Type Methods Using Generics #3221
Comments
Hi, I would like to work on this issue. |
Hi, already working on it |
Okay, I will look into other issues
…On Tue, 28 Jan 2025 at 1:46 AM, RW ***@***.***> wrote:
Hi, already working on it
You are welcome to help with other issues
—
Reply to this email directly, view it on GitHub
<#3221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP5AMYEKNWKP5LVBSIRR7BT2M2H3LAVCNFSM6AAAAABSXKJJOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWHAYDAMBXG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Will push my changes in a few hours |
ReneWerner87
added a commit
that referenced
this issue
Jan 28, 2025
ReneWerner87
added a commit
that referenced
this issue
Jan 28, 2025
ReneWerner87
added a commit
that referenced
this issue
Feb 3, 2025
ReneWerner87
added a commit
that referenced
this issue
Feb 3, 2025
ReneWerner87
added a commit
that referenced
this issue
Feb 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We propose implementing the fluent concept for the methods
Status
andType
in the Fiber framework using generics, as discussed in the following articles:Background:
Using generics allows for method chaining by having methods return a generic interface type, similar to the
self
keyword in other languages. Since Go does not have aself
keyword, generics provide a feasible alternative without significant language changes.Proposal:
Modify the
Context
Interface:Change methods like
Status
andType
to return a generic interface instead of a concrete type.This enables fluent method chaining while maintaining type safety and flexibility.
Implement a Generic
Ctx
Interface onApp
:Ctx
on theApp
.Provide Multiple
New
Methods:fiber.New
without any changes.Benefits:
References:
Requested by: @ReneWerner87
The text was updated successfully, but these errors were encountered: