go-zero
go-zero copied to clipboard
how i can using 1 handler for two path /user and user/:id
trafficstars
i wanna handle /user & user/:id by one handler if parameter :id is empty
i try to define struct like this:
Id string path:"id,optional"
but, when i access get /user then i get '404 not found page'
why not use different handlers?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.