Tag: Go

Golang Fprintf, Fprint, and Fprintln | Go FMT Package

In this blog, we are going to look at Golang Fprint, Fprintf, and the Fprintln Format functions from the Go FMT package. Import Golang fmt package to use this Format function. Golang Fprint func Fprint(w io.Writer, a …interface{}) (n int, err error) The Golang FMT package Fprint function takes a writer and variadic parameter in…
Read more

Golang Imports, Types of Imports & Blank Identifier

In this blog, we will take a look at how Golang imports packages in order to access the code functionality. In the previous blog, we looked at the organization of code into Golang Packages, Workspace, and Environment variables like GOROOT and GOPATH. Golang Import The import statement tells the go compiler where to look on…
Read more

Golang Set GOPATH and GOROOT

In this blog, we will take a look at how code is organized in Golang into packages, how to interact with Golang packages, and how to Set GOPATH and GOROOT. Packages are one of the most important concepts in Golang. Golang Packages helps us to separate semantic units of functionality into different packages. This also…
Read more

Golang Channel Syntax, Global Channel

In this blog, we will learn about Golang Channel Syntax. Let us see what we will be learning in this Golang Channel Syntax blog. Golang Channels Basics Restricted Data Flow in Golang Channels Send Only Channel Receive only Channel Golang Buffered Channels Iterating over Channels in Golang and Closing Channels in Golang(for … range loops)…
Read more

Golang Goroutine Syntax and Creation

We will learn about Golang goroutines, creating goroutines to achieve Concurrency in Golang, synchronization using wait groups and Mutexes, and Parallelism in Golang.

Golang Interface Syntax, Composing, and Empty Interfaces

In this blog, we will learn about Golang Interface Syntax. Let’s see what we are going to learn in Golang Interface Syntax. Syntax of Golang Interface Basics of Golang Interface Composing Interfaces Empty Interface in Golang Before learning Golang Interface make sure Basics of Golang are clear: Golang Interface Syntax type <Interface_name> interface { // Method – Initialization } Example:…
Read more

Golang Function Return Multiple Values

In this blog, we will learn about Golang Function, Return Values, anonymous Function and Methods. Let’s see what we are going to learn in Golang Function, Return Values, Anonymous Function. Basic Syntax of Golang Function Golang Function Parameter Return Values Golang Function multiple return values Functions as Types Golang Anonymous Functions Methods in Golang Before…
Read more

Golang Pointers Struct and Array

In this blog, we will learn about Golang Pointers Struct and Array. The Pointers are one of the most important topics in Golang and Pointers are also very important in other languages like C, C++, etc. Let’s see what will be in this Golang Pointers Struct and Array Blog: What are Pointers in Golang? How…
Read more

Golang Defer Panic Recover With Examples

In this blog, we will be looking at another kind of control flow keywords in Golang like Defer, Panic, and Recover. What we will learn? Defer, Panic and Recover in Golang What are the Defer, Panic, and Recover keywords in Golang? Why Golang Defer, Panic, and Recover keywords are used? Important use-cases of Defer, Panic,…
Read more

Golang Loop – For Loop | Iteration

In this blog, we will learn about Iteration i.e Golang For Loop. Iteration is an important part of every programming language and thus Golang has kept it simple. What we will learn about Golang For Loop: Golang For Loop Golang For Loop Syntax Continue and break keywords in Golang Looping through collections Before Learning about…
Read more