In golang struct is named collection of data fields. These fields can be of different types. Struct acts as a container that has different heterogeneous data types which together represents an entity….
Tag: go
An efficient way to check if a key exists in a Map in Go (Golang)
Below is the format to check if a key exist in the map There are two cases If the key exists val variable be the value of the key in the map…
Length of a map in Go (Golang)
The golang builtin function len() can be used to get the length of the map which is number of key-value pairs present in the map. Below is the format for using this…
Maps in Go (Golang)
This is the chapter 19 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – MethodPrevious Tutorial – Slice Now let’s check…
Slice in Go (Golang)
This is the chapter 18 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – MapsPrevious Tutorial – Array Now let’s check…
Two Dimensional (2d) and Multi-Dimensional Array and Slice in Go (Golang)
In go multi-dimension is possible for both array and slice. Let’s see both of them in detail. Multi-Dimensional Arrays Overview Below is the format for declaring a multidimensional dimensional array where len1…
Understanding Array in Go (Golang) – Complete Guide
This is the chapter 17 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – SlicePrevious Tutorial – Struct Now let’s check…
Understand for-range Loop in go (golang) – Complete Guide
This is the chapter 11 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – If ElsePrevious Tutorial – For Loop Now…
For Loop in go (golang)
This is the chapter 10 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – For Range loopPrevious Tutorial – Constants…
Switch Statement in Go (Golang)
This is the chapter 13 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – Defer keywordPrevious Tutorial – If Else Now…