Live data from Hacker News

Show HN: A simple Go web server with logging, tracing, health check

gist.github.com

11–20 of 97 posts

Re: Show HN: A simple Go web server with logging, tracing, health check

#12
post #2

I do not quite see the point of this (other than being an exercise). We already have web server that do "logging, tracing, health check, graceful shutdown." I do not care about zero deps, because I only install them once and the deps are taken care of by the package manager. In my opinion, the Go web server only makes sense as part of a Go application as a whole. But a standalone Go web server does not make much sens…

I assume this is showing you that you could easily build these things into your own application server. At least that's what I took away.

Re: Show HN: A simple Go web server with logging, tracing, health check

#14

So a hundred lines of pure boilerplate hooking up Go standard libraries, assumedly exactly how they were intended to be used. How is this news worthy?

Hi Ultimatt, this is just a reminder for me on how to do those things when I start a new app in Go, instead of always google for them. Didn't expect to hit the homepage!

Re: Show HN: A simple Go web server with logging, tracing, health check

#17
post #2

I do not quite see the point of this (other than being an exercise). We already have web server that do "logging, tracing, health check, graceful shutdown." I do not care about zero deps, because I only install them once and the deps are taken care of by the package manager. In my opinion, the Go web server only makes sense as part of a Go application as a whole. But a standalone Go web server does not make much sens…

I disagree, I will always prefer projects with the least dependencies given two options with the same feature set.

We should always try to strive to lower dependencies when it makes sense.

Re: Show HN: A simple Go web server with logging, tracing, health check

#18

Yea lets ditch everything we learned about modularization in the past 20 years and put everything in one single binary

I don't think we did learn anything about modularization in the past 20 years. Programming languages still don't do it even remotely decently. Users still make a common mistake of splitting things into multiple files for the sake of splitting, just as your comment implies. These things are all about UX, which is known to be neglected in programming.

Re: Show HN: A simple Go web server with logging, tracing, health check

#19

Yea lets ditch everything we learned about modularization in the past 20 years and put everything in one single binary

Having to rebuild thousands of binaries every time a vulnerability is found in a popular library is seriously hurting Linux distributions.

That, and having to handle vendorized dependencies.

Re: Show HN: A simple Go web server with logging, tracing, health check

#20
post #9

Isn't Caddy written in Go? How is this different?

When you're writing a Go application and want just a few things out of a web server, something like this is a nice demonstration on how to do that with a few lines in your Go program. Yes, you could use Caddy, or you could even import it and use it as a library; but if you prefer something like this, there you have it.
Post reply on HN