- Hands-On Dependency Injection in Go
- Corey Scott
- 52字
- 2021-06-10 19:17:48
What does this mean for Go?
When using composition—particularly the unnamed variable form—to satisfy interfaces, LSP applies just as it would in object-oriented languages.
When implementing interfaces, we can use LSP's focus on consistent behavior as a way of detecting code smells related to incorrect abstractions.