You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@appleboy Thank you for ur reply.
I do know use :optional can get the param value that without a slash, but why there should be a "/" when get an optional param? Is there any way to get optional param without that "/" ? Thank you for your kindness!
router.GET("api/:fixed/*optional", func(context *gin.Context) {
t1 := context.Param("fixed")
t2 := context.Param("optional")
})
curl http://127.0.0.1:8000/api/user/123
t1 will be "user"
t2 will be "/123"
Is this a bug?
Thank you for any reply
The text was updated successfully, but these errors were encountered: