go-zero
go-zero copied to clipboard
how i can using 1 handler for two path /user and user/:id
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'