So you write your go web app, build a binary and think, "Now I can throw it all around the place for deployment". Well, not really. Go compiler does not package in your resources(which would be absolutely the right thing to do considering memory footprint). The resources have to be in the path of the executable binary to be found.
The following tools help you to do that:
One other transparent way to do it would be to append your resources with the binary, move it to your deployment directory/server, extract and execute it. It can't get any simpler than that. I wrote up a bash script to do it.
#build your executable
go build -o myapp
# /view,/static,/conf directories
#zip the resources in resources.zip
zip -r resources.zip views static conf
#append them to your executable binary
cat resources.zip >> myapp
# Adjust self-extracting executable archive
zip --adjust-sfx myapp
#move to tmp dir or move it to your server
mv myapp ~/gotmp/myapp
#cd to the tmp dir
rm -r views static conf
#unzip the executable. or on server unzip it
Make it executable
$chmod +x standalone
I hope the Go team has something up their sleeves for better resource packaging. That would be one killer feature.