String formatting in Golang

String formatting is essential when we need to create a string dynamically. String formatting makes our lives easier by allowing us to do things that can take much longer if done some other way. For example, we need to print a hex value of a number. Using string formatting it is a lot easier. In […]

String formatting in Golang Read More ยป

Comparing Strings in Golang

Comparing strings together is an important task that is almost unavoidable in large programs. In this post, we will see different ways of comparing strings in Golang. 1. Using the Golang Comparison Operators There is a multitude of comparison operators in Go. Each operator works in the way it looks. We will see what are

Comparing Strings in Golang Read More ยป

The while loop in Golang

The while loop is a very important construct in general programming. But in Go, there is no loop called while. There are only for-loops. The while loops can be emulated using the for-loops in Go. So, here are some examples of how it can be done. How to construct while loop in Golang? The while

The while loop in Golang Read More ยป

The for-loop in Golang

Loops are an essential part of any programming language. It does a single task multiple times. In this post, we will be diving deeper with the for loops in Go. The for-loop syntax The for loop is one of the most common loops in programming. Almost every language has it. The for loop in Go

The for-loop in Golang Read More ยป

The blank identifier in Golang

Sometimes, a programming language needs to ignore some values for multiple reasons. Go has an identifier for this. If any variable is declared but not used or any import has the same issue, the Go compiler throws an error. Golang blank identifier helps prevent that. What is the blank identifier? The blank identifier is the

The blank identifier in Golang Read More ยป