4 ms·
Why even allow registrations at a distance? I'm a complete go beginner but that feels more in the spirit of go to me: making you do something a little annoying
by iudqnolq 3y ago
Why even allow registrations at a distance? I'm a complete go beginner but that feels more in the spirit of go to me: making you do something a little annoying that ends up being clear and simple.
Of course it's too late now but I'm surprised this API was ever considered because it seems obviously scary and wrong to let a dependency just create it's own routes.
- numbsafari 3y agoHow would you propose they block it? Can you provide an example from another language where it is blocked?
- iudqnolq 3y ago> How would you propose they block it? Rather than have a single global mux have a mux instance. You call methods on that instance to register routes and then serve the instance. This means you can use your ide to find all routes.
- assbuttbuttass 3y agoThis already exists. The point is you can still call methods on your mux instance from anywhere in the codebase