Re:Mux – A lightweight, fast HTTP request router for Go
by 1_2__3 on Monday December 05, 2016 @12:15PM
(#13107018)
What? No! There's no indication at all these two libraries are compatible - why would you want two completely disparate projects to give some indication they support the same interface?
[ Parent
| on HN ]
Re:Mux – A lightweight, fast HTTP request router for Go
by Lewisham on Monday December 05, 2016 @12:32PM
(#13107236)
Because many of the base infrastructure libraries are compatible as long as they used interfaces (grumble grumble os.File). I would be very surprised if this doesn't implement net/http/ServeHTTP
Re:Mux – A lightweight, fast HTTP request router for Go
by TheDong on Monday December 05, 2016 @11:53PM
(#13112349)
It doesn't matter what it's named though, you can always alias the import.
If it was "github.com/foo/poppycock" I could just write import mux "github.com/foo/poppycock" and use it as mux.
Import name similarity is a terrible argument for picking a name.
Re:Mux – A lightweight, fast HTTP request router for Go
by insertnickname on Tuesday December 06, 2016 @01:04AM
(#13112583)
There are cases where it makes sense, like https://github.com/pkg/errors which is meant to be a drop-in replacement for the stdlib `errors` package containing a superset of its functionality.