Townsourced Tech Blog

Tech musings from a local development agency

#Continuous Integration

Choosing A Library to Embed Static Assets in Go

  • 26
  • Apr
  • 2018
One of the oft-touted benefits of Go is that applications written in it are easily deployed because they are statically complied. A lot of this benefit goes away if you need to manage the location and permissions on a bunch of files needed to run a web application. The solution is to compile any necessary files into the application binary itself. This can be done in Go by using a byte slice literal containing the string representation of the bytes in a file.