This simple bash/zsh function automates a make
-based Go project that uses modules (No GOPATH
muckery required).
Copy the goproject
file somewhere on your $PATH
and chmod +x
it, or copy the function definition into your own bash/zsh script.
This is little more than a wrapper around running go mod init <etc>
, writing a few files so you don't have to think about it. Expected outputs are shown in comments following each command.