Module should be highly cohesive and loosely coupled.
Open Closed Principle:
Entities should be open for extension, but closed for modification.
Code doesn't have to be changed every time when the requirements change.
In golang, code should be able to override a struct, using Stratergy Design Pattern
Liskov Substitution Principle:
LSP states that objects of a superclass should be replaceable with objects of its subclasses without breaking the application.
eg: API which works correctly in base class, when extended by the derived class, it should work correctly in the derived class.
LSP deals with Inheritance, which is primarily not applicable in golang, but we can apply LSP in go, using interface and polymorphism.
Interface Segregation Principle:
Clients should not be forced to depend upon interfaces that they do not use.
The goal is to reduce the side effects and frequency of required changes by splitting the software into multiple, independent parts.
The above statement is achievable if we define our interface for a specific task.
Dependency Inversion Principle:
High-level modules should not depend on low-level modules; both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions.
Its about inverting the classic dependency between high-level and low-level components by abstracting away the interaction between them.
The general concept is to reduce the coupling between the classes/struct.