Tag Archives: Golang-Program

A switch statement is a multiway branch statement. It provides an efficient way to transfer the execution to different parts of a code based on… Read More
Structure in Golang is used to store different types of data in one place. ‘struct’ itself is a user-defined data type. The syntax of ‘struct’… Read More
To fetch an Integer variable as String, Go provides strconv package which has methods that return a string representation of int variable. There is nothing… Read More
In Golang when we want to remove the duplicates not considering any particular order as the initial values, we make use of Mapping in Go… Read More
Structs consist of data, but apart from this, structs also tell about the behavior in the form of methods. Methods attached to structs is very… Read More
A struct (Structure) is a user-defined type in Golang that contains a collection of named fields/properties which creates own data types by combining one or… Read More
Arrays in Golang or Go programming language is much similar to other programming languages. In the program, sometimes we need to store a collection of… Read More
A structure or struct in Golang is a user-defined data type that allows to combine data types of different kinds and act as a record.… Read More
Default values can be assigned to a struct by using a constructor function. Rather than creating a structure directly, we can use a constructor to… Read More
Function performs a specific task, section of code that defined once can be reused. Functions are used to make your code easier to understand by… Read More
A struct (Structure) is a user-defined type in Golang that contains a collection of named fields/properties which creates own data types by combining one or… Read More
Two or more processes executing in a system with an illusion of concurrency and accessing shared data may try to change the shared data at… Read More
In Golang, we can return multiple values at a time from a single function. Multiple return values can be achieved by changing the return type… Read More
Functions are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately… Read More
A struct is mainly a holder for all other data types. By using a pointer to a struct we can easily manipulate/access the data assigned… Read More