Golang

Functions in Golang

Functions in Golang

Functions in Golang Functions in Golang are the blocks of code or statements in a program that allows the user to reuse the same code, which saves memory and also improves the readability of the code. A function is generally used to perform a specific task in a program. Input and output are present in…

Loops in Golang

Loops in Golang

Loops in Golang As for the loops in Golang, there is only one loop available and that is “for loop”. There are no loops such as “while” and “do-while” in Golang as there are in other programming languages like C or Java. For Loop A “for loop” is a loop that repeats itself until the…

Decision Control in Golang

Decision Control in Golang

What is Decision Control in Golang? Decision Control in Golang requires the program to evaluate or test one or more conditions, as well as a statement or statements to be executed if the condition is true, and optionally, other statements to be executed if the condition is false. It is similar to making decisions in…

Data Types in Golang

Data Types in Golang

Data types in golang define the type of data a variable is going to store. In Go, the data types are divided into four categories – Basic – Numbers, strings, booleans Aggregate – Arrays, Structs Reference – Pointers, slices, maps, functions, and channels Interface In this tutorial, we will be looking at basic and aggregate…

Variables in Golang

Variables in Golang

What are variables in golang? Variables in golang are used to store a value. Basically, declaring a variable allocates a memory location in Random Access Memory to store a value of a particular data type. It is useful when the user is entering a value in a program. This value should be saved in a…

Golang – Introduction

Golang – Introduction

What is Golang? Golang or Go is an open-source programming language aimed at being simple, dependable, and efficient. In 2007, Google created the Go programming language. Google was developing significantly at the time, and the code used to manage its infrastructure was growing in both size and complexity at the same time. Go was created…