Go Design Patterns
SOLID Design priciples by Rober C. Martin
- Single Responsibility principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface segregation Principle
- Dependency Inversion Principle
Single Responsibility principle
A type should have one responisibility. Seperation of concerns. God object a terrible idea!
Open-Closed Principle
OCP Open for extenstion, Closed for modification. Specification pattern.
Liskov Substitution Priciple
Interface Segregation Principle
You shouldn’t put too much into interface. Smaller interface the better.
Dependency Inversion Principle
High level Module (HLM) should not depend on LLM. Both should depend on interfaces(abstractions).