Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You don't need a makefile for go. Generally all you need are "go build" "go install" "go test". If you have some generated source you can now used "go generate".


I use those now, but I want to setup some other ideas such as prompting for the database username/password to write into a config.go before compiling. I did not want to store information like this in a public git repo


I suggest that instead of compiling it into the binary, that you use environment variables instead. Or make it command line flags.

Then you can have a bash script that you don't check in that executes the variable with environment variables/ flags.


That doesn't cover non-go files though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: