Phase 3: Golang Low-Level Learning
1. Introduction
Objective: Apply Go to build robust, scalable, and production-grade applications.
Focus Areas: Architecture, frameworks, CI/CD, advanced testing, and deployment.
2. Advanced Project Architecture
- Clean Architecture (Layers: Domain, Use Case, Interface, Infrastructure)
- Monorepo vs Polyrepo structure
- Modular design and packages
- Dependency Injection techniques
3. Building RESTful & gRPC APIs
- REST API with `net/http`, `mux`, or `gin`
- gRPC with `protobuf` and `google.golang.org/grpc`
- API versioning and request validation
- Error handling and logging
4. Middleware and Observability
- Custom Middleware in Go
- Logging (Zap, Logrus)
- Metrics (Prometheus + Grafana)
- Tracing (OpenTelemetry)
5. Testing Best Practices
- Unit Testing with `testing` package
Phase 3: Golang Low-Level Learning
- Table-driven tests
- Mocking with `gomock`, `testify`
- Integration and end-to-end testing
- Code coverage and test reports
6. Task Scheduling and Job Queues
- Background workers with Goroutines
- Queues using Redis + Go (e.g., Asynq)
- Cron jobs using `robfig/cron`
7. Caching and Rate Limiting
- In-memory caching (`sync.Map`, `bigcache`)
- Redis-based caching
- Token Bucket & Leaky Bucket rate limiting
8. CI/CD and Deployment
- Dockerizing Go applications
- Using GitHub Actions for testing and build
- Deployment on:
Linux servers
Kubernetes (K8s)
Serverless (e.g., AWS Lambda via Go)
9. Security and Authentication
Phase 3: Golang Low-Level Learning
- JWT and OAuth2
- Securing HTTP endpoints
- Secure file and secret handling
- Input sanitization
10. Real-World Projects
- E-commerce REST API backend
- gRPC Microservices for a messaging system
- CLI tool with `cobra`
- Telegram or Slack bot using `go-telegram-bot-api`
11. Resources
- Practical Go Lessons (https://www.practical-go-lessons.com/)
- Go Patterns (https://github.com/tmrts/go-patterns)
- Advanced Go Programming by Sergey Matveev
- Official Go Wiki and Proposal Discussions