To use this repository, you should press "Use this template" button. It will clone this repo to another location.
This repository is not ready after cloning, and you should follow a few steps:
- Replace placeholder to match your new repo:
github.com/petuhovskiy/go-template
github.com/<org>/<repo>
- Replace placeholder with your name:
Your Name
Appropriate Name
- Replace the last placeholder with project name:
go-template
your-project
- Remove this from README and write some code.
You can also check if everything is ok by running existing code:
# this will download dependencies
go mod download
# this will run existing code
go run main.go
# now program should be running without errors, until Ctrl+C is pressed
Development
Make sure you have:
- Go 1.16, install
- GoLand / VSCode / other IDE, install goland
- golangci-lint 1.40, install
EnvFile plugin for GoLand is useful for applying conf from .env files. Install here.
To use it:
- Open [Run configuration]
- Select EnvFile tab
- Add file .env from repo root
- On macOS press shirt+cmd+. to display hidden files