Skip to content

refactor: use gin.IRouter instead of gin.Engine#42

Merged
appleboy merged 1 commit intogin-contrib:masterfrom
Laisky:master
May 5, 2024
Merged

refactor: use gin.IRouter instead of gin.Engine#42
appleboy merged 1 commit intogin-contrib:masterfrom
Laisky:master

Conversation

@Laisky
Copy link
Contributor

@Laisky Laisky commented Nov 2, 2023

I thinks it would be better for developer to use gin.IRouter interface than gin.Engine.

gin.Engine is the root router for server. However, there are situations where only the sub-routes obtained after multiple calls to .Group are passed in the code, that is gin.IRouter. In such cases, it becomes difficult to bind pprof.

- Change parameter type of `Register` function to `gin.IRouter`
- Fix typo in comment in `pprof.go`
- Omitted large changes in files diff summary
@appleboy appleboy merged commit 7b5b3bc into gin-contrib:master May 5, 2024
@appleboy
Copy link
Member

appleboy commented May 5, 2024

@Laisky Thanks.

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.

2 participants