├── cmd/ # Main applications
├── internal/ # Private application code
├── pkg/ # Reusable library code
├── api/ # API definitions
├── config/ # Configuration files
├── docs/ # Documentation
├── test/ # Test utilities and data
├── build/ # Build-related files
│ └── docker/ # Docker configurations
└── .github/workflows/ # CI/CD pipelines
-
Clone the repository
git clone https://github.com/your-username/template-golang.git cd template-golang -
Install dependencies
go mod tidy
-
Run the application
go run cmd/main.go
-
Run tests
go test ./...
-
Build Docker image
docker build -t template-golang -f build/docker/Dockerfile . -
Run with Docker Compose
docker-compose -f build/docker/docker-compose.yml up
Copy the example environment file and configure as needed:
cp .env.example .envgit tag v1.0.0
git push origin v1.0.0