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…
Tag: go
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…
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…
Prototype 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 creational design…
Read a large file Line by Line in Go (Golang)
When it comes to reading large files, obviously we don’t want to load the entire file in memory. bufio package in golang comes to the rescue when reading large files. Let’s say…
State Design pattern in Go
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: State design pattern is a…
OOP: Inheritance in GOLANG complete guide
We will try to explain inheritance in GO using comparisons with inheritance in JAVA. The first thing we want to mention here is that GOLANG doesn’t have keywords such as “Extends” and…