├── app
├── cache
├── config
├── database
├── errs
├── httpclient
├── logger
├── middleware
├── migrations
└── validatorApplication Layer and business logic. It contains the application logic and is organized into subdirectories for business domains or features.
└── app
├── user
└── admin
├── admin.go
└── handler.goCache connector, e.g., Redis
Configuration files and environment variables
Database connector, e.g., MySQL, PostgreSQL
Custom error types and error handling
HTTP Client for call external service
Logger setup and configuration
Middleware for request processing, e.g., authentication, logging
Validation logic for request data, e.g., using go-playground/validator
Migration files .sql for database schema changes, e.g., using kongsakchai/simple-migrate
go install golang.org/x/tools/cmd/gonew@latestgonew github.com/kongsakchai/gotemplate github.com/yourname/projectname