2024

Struct in Golang

Golang provides built-in data types like integer, string, float, etc which is very useful for writing simple programs but if you want to write a complex program, you need to…

Read Data in Golang

Capturing the user input is a very important feature of any programming language. we can also read data or user input in Golang Scan Method of fmt package in Golang…

Variadic function in Golang

The variadic function in Golang supports accepting multiple input parameters with just one variable name. This is a special form available for the last parameter in any Golang function. The…

Function in Golang

Function in Golang is an isolated piece of statements that are assigned a unique name and can be used multiple times in your project. Advantages of using function Signature of…

Map in Golang

Map in Golang is an unordered collection of key-value pairs. A map is sometimes called an associative array, hash table, or dictionary Declare a Map in Golang There are five…

Slice in Golang

Slice is Golang is the segment of an array. Unlike an array, the length of a slice is allowed to change. The dynamic length of a slice is the most…

Array in Golang

An array in Golang is a numbered sequence of elements of the same type with a fixed length. Array Representation An array can be treated as a box having multiple…

Switch in Golang

Switch in Golang helps you create different conditions and allows you to execute different codes when different conditions are evaluated. Switch with the case statement in Golang Golang provides the…

if else in Golang

if else in Golang is used to make some decisions. When the condition is satisfied then you can run some piece of code and when the condition is not satisfied…

For Loop in Golang

For loop in Golang allows to repeat a list of statements multiple times. Other programming languages have different kinds of loops like while, do, and until but Go has only…