Design Pattern: Singleton Pattern in Go

Singleton pattern is used to ensure that only an instance of a class is created. Implementing the Singleton pattern in Go is slightly different from other languages. This article demonstrates Singleton pattern implementation in Go.

Design Pattern: Builder Pattern in Go

Builder pattern is used to abstract the complex objects building process from the client and also this pattern is responsible for building objects step-by-step. This article demonstrates Builder pattern implementation in Golang.

Design Pattern: Factory Pattern in Go

We use the Factory pattern to generate object, when we don’t want to instantiate the object directly. Factory generates the desired object based on the selected criteria. In this article we are exploring the implementation of Factory pattern in Golang.

Design Pattern: Prototype Pattern in Go

Prototype pattern clones an existing object to create a new object, instead of building a new object at runtime. This helps reduce resource usage, as the complex object creation/initiation process is replaced with cloning existing objects. This is very useful for keeping object cached and/or default object. This article demonstrates Prototype pattern implementations in Go.

Design Pattern: Adapter Pattern in Go

Adapter pattern helps by enabling an interface to adapt to a new interface. This is useful when we have an existing interface, and some new requirement comes or we need to adapt to some interface that is developed separately. By following the Open/Closed principle, the adapter pattern keeps the existing interface as is, ads the adapter implementation as a bridge to then new interface. This article demonstrates Adapter pattern implementations in Go.

Design Pattern: Bridge Pattern in Go

Bridge pattern is used to provide flexibility to an implementation, that has frequent changes in the implementation. Bridge pattern archives that by decoupling implementation and abstraction. This article demonstrates Bridge pattern implementation in Go.

Design Pattern: Composite Pattern in Go

Using Composite pattern we can make an object and a group of objects, behave the same way. The client will not know any difference between an object and object group/list while using it. This article demonstrates Composite pattern implementations in GoLang.

Design Pattern: Decorator Pattern in Go

Decorator pattern add new functionality to an existing implementation by adding a new layer. The responsibility/functionality is added to individual objects. This article demonstrates Decorator pattern implementations in Go.

Design Pattern: Facade Pattern in Go

Facade pattern adds a new layer on top of any complex subsystem. That way the client does not need to know all the complexity while using the implementation. Facade not necessarily covers all the functionality of the subsystems, only the required functionalities are covered. This article demonstrates Facade pattern implementations in GoLang.