This looks like a pretty incredible quality of life release. I’m super excited by a ton of the changes, but I’ll outline a few below:
I’ve been holding off on some of my side projects because I was waiting for embed (and because I’ve got so much else on my plate), so maybe it’s time to dust those off.
Go summary, especially calling out embedding. I had missed that!
That “embed” package looks fun!
What is fun about it?
It replaces a whole slew of other packages which do pretty much the same thing.
In particular, I’m excited about being able to just embed all the assets for a web-app into the binary. Then you can just distribute the binary and have it serve the assets as if it were from an actual FS.
I’m assuming people will end up writing adapters which will allow you to use assets on the FS in dev and the bundled assets in prod. This was hard in the past because there were so many alternatives.
I would rather shipping the static assets as a separate layer inside my container rather than bundling it into the binary. But there are use cases outside of containers that perhaps static assets would be nice to have. I.e. desktop ui app
Not everything runs in a container; not even web apps.
Considering how the Go toolkit has evolved, I imagine (and hope) it will be a native feature of the Go build/test tools such that you won’t need adapters. It’ll simply be a build flag/annotation