The Factory Method Pattern is a creational design pattern that facilitates the use of a single product interface with different concrete implementations of said product. It does this by handling the creation of said product implementations.
This makes it possible to add additional concrete implementations of the target interface without modying client code, minimizing the amount of code changes needed to introduce or change functionality. This, in turn, minimizes the chances of introducing bugs into the application. If you are unfamiliar with interfaces in golang, see this post before proceeding.
[Read More]