Reputation: 3113
GOLANG gurus:
I know this might seem illogical, but here it goes.
I have to distribute a binary (which in this case would be a webserver) to other engineers for testing. To keep it simple, because they might not be developers, I wanted to see if there might be some automated way to pack images into a GOLANG binary ? I've done this static HTML pages in the past, and it works great.
Obviously, at first run I could unzip to the file system, but to keep things clean I was trying to see if anyone has any thoughts how I could stuff them into a binary.
Any Ideas ?
Upvotes: 0
Views: 988
Reputation: 2755
You could use the same tools you used for HTML files... I'm assuming you used something like:
Which essentially transform your files in go source code and the expose an http.FileSystem-like API for reading your data.
Upvotes: 3