Example of Strategy Pattern in Golang
What is Strategy Pattern
The strategy is a behavior pattern. It fits where multiple choices for an interface are available and the design would allow switching them dynamically.
- A set of choices with similarities in the interface
- Dynamic update of a choice
- A cache with evictions
- Multiple eviction algorithms
- A cache could switch to a different…