go

Packing multiple images into a GOLANG binary  #angularjs #reactjs

  • Link-only answers can become invalid if the linked page changes.
  • Stack Overflow works best with JavaScript enabled
  • Which essentially transform your files in go source code and the expose an http.
  • You could use the same tools you used for HTML files…
  • While the link may answer the question, it is better to include the essential parts of the answer and provide the link for reference.

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.

@ng_real_ninja: Packing multiple images into a GOLANG binary #angularjs #reactjs

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 ?

I implemented something like this for Go on google app engine. You can take a look at the source code for specifics, basically this github link demonstrates how to use simple file chunks to work around limitations of the free hosting on GAE to run a simple CDN that can serve up N files of whatever type.

go