Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Releases: klingtnet/embed

Release v0.0.1

07 Oct 13:46
78fc802
Compare
Choose a tag to compare
Implement embed

embed is yet another tool for embedding static files in a Go binary.

I was not satisfied with any of the existing tools for embedding static
content, either they lacked functionality like including more than a
single file or folder or their APIs were cumbersome to use.  Thus I
decided to implement a file embedding tool myself.  The original
implementation took about an hour and consistent of two files, one for
the binary and another one to support SQL schema migrations from
embedded content.  You can find the original implementation here [1].
Like often the 80:20 rule fit here as well and setting up tests, CI,
making the library importable and writing some sentences of
documentation took five times as long as writing the initial
implementation.  However, I still like how it turned out in the end and
think that it is pretty usable.  I know that this will be redundant when
the file embedding proposal lands in Go 1.17 but there still a couple of
months left until this happens.

[1]: https://gist.github.com/klingtnet/b66ecace3e87b10972245fec7e4c3fc5