A ready-to-use Go development environment with VS Code DevContainer, pre-configured for rapid development:
- Go 1.25
- Delve debugger (
dlv) - GolangCI-Lint for linting
- Air for live-reloading
- MockGen for generating mocks
- Networking & DB tools (
ping,netcat,postgresql-client, etc.)
Perfect for building CLI tools, APIs, or microservices in Go with a smooth developer experience.
app/
├── .devcontainer/ # VS Code DevContainer files
├── cmd/ # Main applications
├── internal/ # Private application code
├── pkg/ # Public libraries
├── tests/ # Unit and integration tests
├── .gitignore
├── .air.toml # Air live reload configuration
├── go.mod
├── go.sum
├── Makefile
└── README.md
git clone https://github.com/lmriccardo/go-template.git
mv go-template <ur-app-name>- Install the Remote - Containers extension
- Open the folder in VS Code
- Reopen in the container when prompted
make build # or go build -o bin/app ./cmd/app
make run # or ./bin/appmake test
- Runs all tests under
./... - Uses Go's standard
testingpackage
make lint
Runs golangci-lint on all packages
| Command | Description |
|---|---|
make build |
Build the app binary |
make run |
Run the app |
make dev |
Run with live reload using Air |
make test |
Run all tests |
make lint |
Run linters |
make clean |
Remove build artifacts (bin/) |
You can create a new repository from this template directly on GitHub:
- Go to the template repository page.
- Click the green “Use this template” button.
- Fill in your repository name, description, and choose Public or Private.
- Click “Create repository from template”.
- Clone your new repo locally
- Open in VS Code and optionally reopen in the DevContainer