One complication is that there is a settings file that the executable needs to run, should I copy that file to $GOBIN\ using the build script so that it is available when the user runs the executable? Previously since I just build the executable in the same directory as the main.go file I could expect other files to be at a constant relative path, what is the best practice to do go install when the executable has some runtime dependencies?
One complication is that there is a settings file that the executable needs to run, should I copy that file to $GOBIN\ using the build script so that it is available when the user runs the executable? Previously since I just build the executable in the same directory as the main.go file I could expect other files to be at a constant relative path, what is the best practice to do go install when the executable has some runtime dependencies?
On Monday, June 23, 2014 11:40:21 AM UTC-5, Chris Hines wrote:The recommended project structure is documented at http://golang.org/doc/code.html.
On Monday, June 23, 2014 12:06:19 PM UTC-4, brand...@gmail.com wrote:I currently have a working go project, https://code.google.com/p/gocupi/, and the build step is the user manually typing go build main.go, and then running ./main, it seems like that is not the best approach(the executable being called main is not helpful...) I was hoping someone could point me towards a good makefile example / build script that I could
use(being cross platform would be good) and/or recommend a better way to organize my project.