A little GO gem…

way down at the bottom (at the time) of this reddit thread was a nugget of goodness…

So, you can define the same Run(string) int function in each of run_{windows,linux,darwin}.go, and go build will compile only the relevant function.

Tested it this morning and it worked great (though doesn’t work with go run *… you have to actually build it) 🙂

Leave a Reply