To make a new Go App follow the steps.
- Create Git repo with a read me.
- Clone to local drive or folder
- Copy this project and directories to the new folder.
- commit and push. Alternativly
- Forl this template to your new project name in github
- clone your project,
- follow the steps below,
Now the set up
- Terminal in Home folder and run the commands
go mod init [your app name]
go mod tidy
example:
go mod init template-api go mod tidy
- Program should compile, and if you import any more modules, just run
go mod tidy
- Now is a good time to comit and push your code.