The SOLID principles are essentially a set of rules for helping you write clean and maintainable object-oriented code. Let's go over what the initials stand for:
- Single responsibility
- Open/closed
- Liskov substitution
- Interface segregation
- Dependency inversion
But hold on a minute! Is Go an object-oriented language or is it a functional programming language with some syntactic sugar tacked on top?
Contrary to other, traditional object-oriented programming languages, such as C++ or Java, Go has no built-in support for classes. However, it does support the concepts of interfaces and structs. Structs allow you to define objects as a collection of fields and associated methods. Even though objects and interfaces can be composed together, there is, by design, no support for classic object-oriented inheritance.
With these observations...