Note: Interested in understanding how all other design patterns can be implemented in GO. Please see this full reference – All Design Patterns in Go (Golang) Definition: Chain of Responsibility Design Pattern…
Category: Tech
Strategy Design Pattern in Go (Golang)
Note: Interested in understanding how all other design patterns can be implemented in GO. Please see this full reference – All Design Patterns in Go (Golang) Definition: Strategy design pattern is a…
Different ways of creating an error in Go (Golang)
Before learning about different ways of creating am an error in Golang lets first understand about the error. Error is an interface type with below signature Any by definition of interface any…
net/http package get Query Params in Go(Golang)
Note: If you are interested in learning Golang, then for that we have a golang comprehensive tutorial series. Do check it out – Golang Comprehensive Tutorial Series. Now let’s see current tutorial Often…
Flyweight Design Pattern in Go (Golang)
Note: Interested in understanding how all other design patterns can be implemented in GO. Please see this full reference – All Design Patterns in Go (Golang) Definition: It is a structural design…
Composite Design Pattern in Go (GoLang)
Note: Interested in understanding how all other design patterns can be implemented in GO. Please see this full reference – All Design Patterns in Go (Golang) Definition: This is a structural design…
Golang: Redis cluster client example
First, we will write the Redis cluster layer that will have a function to initialize the Redis cluster client. The Redis cluster client will only be created once and used throughout. In…
Adapter Design Pattern in Go (GoLang)
Note: Interested in understanding how all other design patterns can be implemented in GO. Please see this full reference – All Design Patterns in Go (Golang) Introduction: This design pattern is a…
Different ways of iterating over a map in Go (Golang)
Range operator can be used to iterate over a map in Go Let’s define a map first Iterating over all keys and values Output: Iterating over only keys Output: Iterating over only…
Go: Different ways of iterating over an Array and Slice
Go provides many different ways of iterating over an array. All examples below are also applicable to slice. Let’s define an array of letters first Using the range operator With index and…