Open marwan-at-work opened 5 years ago
I agree the SimpleServer should be simple, with minimal dependencies.
I think a very large portion of whats above is from the examples, but some is also coming from the Google and AWS tooling within the pubsub packages. For those latter dependencies, I think we're stuck with them until we look to explode gizmo out to a suite of repos. (Something I believe go-kit is also considering) Perhaps we should consider this route? I'm down for chatting about approaches.
Beyond that, I do believe there is some low hanging fruit that can be cut out. For instance, I think github.com/NYTimes/logrotate is no longer needed as we don't log to files anymore. At this point, I think we should definitely consider any PR that proposes we remove a dependency from the server.
For now, I'm going to try and get the examples separated at a bare min. That should ease some of the pains.
If you are looking to build something simple, such as SimpleServer, but with just
net/http
andgorilla/mux
you get the following stats:But if you build it with gizmo SimpleServer this is what you get:
I know there's work to separate dependencies, but does it make sense to also separate the SimpleServer and not make it this bloated?