GO is available to be installed on Win, Mac, and Linux platforms. Let’s see the installation set up for Linux Install Download the archive of latest version of GO from here –…
Category: Tech
Install GO (aka Golang) on MAC
Overview GO is available to be installed on Win, Mac, and Linux platforms. GO can be installed on MAC in three ways Using archive Using brew Using .pkg installer Let’s look at…
Implement while loop in Go (Golang)
Go doesn’t have the while keyword. Instead, it has the for keyword only. However for keyword can be used to simulate the functionality the same as while. for loop in GO basically…
Returning Multiples values from a function in Go (Golang)
Overview A function is a group of statements that perform a specific task. Signature of a function A function in Golang can return multiple values. An example of a function. The below…
User defined function types in Go (Golang)
Overview In GO, the function is also a type. Two functions will be of the same type if They have the same number of arguments with each argument is of the same type They…
Higher-Order Functions in Go (Golang)
Overview Higher-order functions are those functions that either accept a function as a type or return function. Since a function is a first-order variable in Golang they can be passed around and…
Anonymous Function in Go (Golang)
Overview As the name suggests anonymous functions are function which does not have any name. In Golang function are first-class variables meaning that They can be assigned to a variable Passed around…
Pass Variable Number of Arguments to a function in Go (Golang)
Overview In Go, a function that can accept a dynamic number of arguments is called a Variadic function. Below is the syntax for variadic function. Three dots are used as a prefix…
Return a function from a function in Go (Golang)
In Golang function are first-order variables meaning that They can be assigned to a variable Passed around as function argument Returned from a function While returning a function from another function, the…
Pass function as an argument to another function in Go (Golang)
Golang function are first-order variables meaning that They can be assigned to a variable Passed around as function argument Returned from a function In GO function is also a type. Two functions…