Chapter 7. Behavioral Patterns - Visitor, State, Mediator, and Observer Design Patterns
This is the last chapter about Behavioral patterns and it also closes this book's section about common, well known design patterns in Go language.
In this chapter, we are going to look at three more design patterns. Visitor pattern is very useful when you want to abstract away some functionality from a set of objects.
State is used commonly to build Finite State Machines (FSM) and, in this section, we will develop a small guess the number game.
Finally, the Observer pattern is commonly used in event-driven architectures and is gaining a lot of traction again, especially in the microservices world.
After this chapter, we'll need to feel very comfortable with common ...
Get Go: Design Patterns for Real-World Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.