The Strategy Pattern In Go

Israel Miles
Level Up Coding
Published in
5 min readNov 23, 2020

--

Add functionality to your program on the fly!

Image from Reddit

The Strategy pattern is easily one of my favorite design patterns. It allows you to add functionality to an object on the fly during program run time. A great example use case for this design pattern is video games such as one of my all time favorites — Old School Runescape. In this game you could add range to your attack by equipping a bow, change your damage type to…

--

--

Software Engineer at Audible. Remote Work Proponent and writer of anything that gets a rant out of me.