I tried something like this:

router.GET("/example/log", logAllHandler) router.GET("/example/:id/log", logHandler)

But Gin does not allow this and panics upon start.

An idea is write a middleware to handle this case, but ...