3 ms·
Embed is fairly new; not new this release, but not that old. If you're not keeping up with every new release it is easy to not yet be aware of the new features.
by jerf 5y ago
Embed is fairly new; not new this release, but not that old. If you're not keeping up with every new release it is easy to not yet be aware of the new features.
But, yes, to samhw's issues, it is now trivial in Go and built into the standard library to embed arbitrary files and/or directories into a Go executable. Also have no idea what the "semi-grudging" comment about build tags are; they've been there since the beginning and heavily used by the Go standard library for many things. Go, of all languages lately, is the most comfortable with reserving things for the compiler/runtime; if they wanted to, they would have. It was always obvious that build tags were necessary and I don't see what's "grudging" about them at all.
- samhw 5y agoYeah, this is the right answer in my case. I wrote Go professionally for a few years, a few years ago, and I haven’t really touched it since. All my knowledge will definitely be a few years out of date.