go programming

Function arguments in Golang

Function arguments in Golang

Go supports two main ways to pass arguments: Pass by Value and Pass by Reference. Go uses pass by value by default.

Function returning multiple values ​​in Golang

Function returning multiple values ​​in Golang

In Go language, you are allowed to return multiple values ​​from a function, using the return statement. In other words, in a function, a return statement can return multiple values.

Switch Statement in Go

Switch Statement in Go

Golang like most other programming languages ​​has switch statement. Here is how to use switch statement in Golang.

Cases to know when using selection statements in Golang

Cases to know when using selection statements in Golang

In this article, we will learn how to use default case to avoid deadlock. But first, we will learn what is deadlock case when using select command in Golang?

Anonymous structures and fields in Golang

Anonymous structures and fields in Golang

Anonymous structs in Golang are temporary structures with no names used for one-time purposes, while anonymous fields allow embedding of unnamed fields.

How to use operators in Golang

How to use operators in Golang

Operators allow us to perform different types of operations on operands. In Go language, operators can be classified based on their different functions.

Void identifier in Golang

Void identifier in Golang

_(underscore) in Golang is called Blank Identifier. Identifier is a user-defined name of program elements used for identification purposes.

Methods with the same name in Golang

Methods with the same name in Golang

Golang allows creating two or more methods with the same name in the same package, but the receivers of these methods must be of different types.

Functions in Go

Functions in Go

In Go, functions are blocks of code that perform specific tasks, which can be reused throughout the program to save memory, improve readability, and save time.

Variable Scope in Go

Variable Scope in Go

The scope of a variable in Golang determines which part of the program the variable is accessible to. In Go, all identifiers have a lexical scope that is determined at compile time.

Control Statements in Golang (if, if-else, Nested-if)

Control Statements in Golang (if, if-else, Nested-if)

What conditional statements does Golang have? How to use conditional statements in Go programming? Let's find out together!

Defer Keyword in Golang

Defer Keyword in Golang

In Go, defer statements delay execution of a function or method or an anonymous method until the nearby functions return.

Methods in Golang

Methods in Golang

Methods in Golang are like functions but with one major difference: they have a receiver argument, which allows access to the properties of the receiver.

How to use variables in Golang

How to use variables in Golang

In Go language, Identifier can be a variable name, function name, constant, statement label, package name or type. Here is what you need to know about using Identifier in Golang.

Nested Structure in Golang

Nested Structure in Golang

Go language allows nested structures. A structure that is a field of another structure is called Nested Structure.