問題タブ [go-server]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
70 参照

go - How do I add a Subrouter to muxtrace.Router()?

I currently have a function in Go that creates a subrouter if a mountpoint is passed when creating a new server. I want to set up tracing using muxtrace.

router = router.PathPrefix(mountpoint).Subrouter() returns an error:

It doesn't look like there is a Subrouter for the *mux.Router type used in the tracing package. So how would I trace the sub route?