i would really love to read a short super opinionated guide to Go web development by someone with the same values/requirements as me, like:
-
-
@b0rk yeah that's understandable. I think I make a specific exception for ORMs when they're used responsibly. Because I think that figuring out a DB schema and a bunch of custom code to access it is often a higher burden when returning to an old project.
-
-
@polotek hm yeah I'm open to being sold on ORMs
-
-
@b0rk I think it takes time to build the right muscles around ORMs. They can very easily be footguns and feel like they're not worth it. Not to mention that many of the more recent ones are way overblown IMO. I think avoiding them is fine. I just wanted to get a little more understanding of where you're coming from.
-
@b0rk I don't have a guide, but I built a bunch of pieces that can be used for this.
I built my own stuff for static asset build (compatible with go:embed), JS bundling (same), signal handling, systemd socket activation, state machine building, etc.
Regarding SQL specifically, I always try to avoid it (in favour of in process storage libraries) or at most use it as a KV document store with json encoded data. YMMV of course.
I occasionally iterate through the new kids on the block which solve some other issue (logging, HTTP routers, etc)
-
@b0rk sorry for being lazy and self promoting, but all I can link to is this Makefile, which I think should provide you with a good a starting point to check if it matches what you're after: https://github.com/mariusor/oni/blob/master/Makefile#L43
-
-
@makeworld @b0rk pretty happy with https://git.sr.ht/~aw/fishbb as a base, there's some messy/awkward parts, but it's more or less a style I'm happy with