I'm totaly new to go (it looks fabulous btw).
So I want to build a "web-"app in go with the revel framework. The problem is I code on my mac (os : darwin, arch : amd64) and I want to deploy the app on my server (os : ubuntu 12.04, arch : amd64).
I "go get" revel in local (so
revel build myapp /path/to/deploy
I'm not sure if this helps.. but here goes..
Your exact situation is what I am currently doing daily whilst I develop my first proper web app in Go. I develop on both a Windows laptop (whilst bored at work.. I'm a .NET developer at my workplace!) and my Mac at home. I then deploy it to an Ubuntu server hosted on Digital Ocean.
My workflow is:
go buildthe code in place on the server
go getany libraries that it complains about which I don't have on the server (for example,
gorilla/muxwasn't on the server today so I just ran that)
go buildagain (if applicable)
..then just run it on the server.
When starting with this workflow (which I am still trying to perfect with bash scripts, etc ...) I found that a consistent
GOPATH across environments really helps.
For example, my
GOPATH on each machine is:
Each of them have exactly the same structure:
...etc. This greatly simplifies the entire thing and is what allows me to develop across 3 environments seamlessly.
I am still getting used to Go and this setup (being a .NET developer at my core) - but it seems to be doing the trick for now.