Hacker News new | ask | show | jobs
by iamcalledrob 1035 days ago
> You don’t want to deal with processing a raw http request from the web server. You don’t want to split headers. You don’t want to sanitize input params, deal with character encoding, content types, gzipping, cache control, etags, basic authentication, flushing headers, chunking bodies, file streaming, tcp sockets, slow client avoidance, and probably 1000 other things I can’t recall.

The Golang stdlib does all this for you, no framework needed :)

I honestly think Golang SSR with html templates + a sprinkling of Javascript to enhance is an extremely pragmatic way to go.

You build your entire service into a single binary (assets included with go:embed).

You shed the complexity of the framework AND the web server AND deployment in addition to React etc.

1 comments

Golang is in a special class on its own. Write some handler functions and pass around a context struct and call it a day. I wish every stdlib took care of all that stuff :)