This project aims to provide a straightforward setup for beginners who want to explore Golang.
Whether you’re new to programming or just diving into Go, this repository will help you get started with essential concepts and tools.
Learn how to set up routes and handle HTTP requests using the Echo framework.
Understand how to interact with databases using GORM, a powerful Go ORM library.
Explore Go’s concurrency model by using channels and goroutines effectively.
go-bundled/
┣ .github/
┃ ┣ workflows/
┃ ┗ dependabot.yml
┣ internal/
┃ ┣ handlers/
┃ ┣ middlewares/
┃ ┣ models/
┃ ┣ repositories/
┃ ┗ services/
┣ mocks/
┃ ┗ mock_UserRepositoryInterface.go
┣ pkg/
┃ ┗ validators/
┣ tmp/
┃ ┣ build-errors.log
┃ ┗ main
┣ .air.toml
┣ .gitignore
┣ .mockery.yaml
┣ README.md
┣ docker-compose.yml
┣ go.mod
┣ go.sum
┗ main.go
Learn how to write unit tests for your Go code to ensure reliability with Testify and Mockery.
Integrate linters (such as golangci-lint) to maintain code quality.
Make sure you have Go installed on your system. If not, download it from here.
Clone this repository:
git clone [email protected]:carlosgonzalez/go-bundled.git
Navigate to the project directory:
cd go-bundled
Install dependencies:
go mod tidy
Mockery
go install github.com/vektra/mockery/[email protected]
Install air
if you want to have live-reload capabilities
go install github.com/cosmtrek/air@latest
Run the application:
docker-compose up -d
if you have air installed, run:
air
otherwise simply run with
go run .
Generate mocks with Mockery
mockery --all
Contributions are welcome! If you find any issues or want to enhance the project, feel free to submit a pull request.