Posts for golang

How to use tuple in Golang

In this article, you are going to learn about how to use tuples in the Go language. In general, a sequence of finite ordered elements is considered as a tuple and in programming languages, a tuple means pair or an ordered set of values. Depending on the rules of particular programming languages, the values of […]

January 25, 2022 in Code examples & GoLang

How to use enum in GoLang

In this article, you are going to learn about how to use enum in the Go language. Enum refers to the term as a special data type that contains a set of predefined constants. It is also known as an enumerator. Enums are used widely and very powerful but like some other programming languages, the […]

January 18, 2022 in Code examples & GoLang
Deven
Deven wrote

How to use array of structs in GoLang

In this article, you will learn about how to use an array of structs in the Go Language. In the Go language, a struct is defined as a user-defined type that allows storing different types of values into a single type. In Object-Oriented Programming languages, you may hear about the class that is used to […]

January 15, 2022 in Code examples & GoLang
Deven
Deven wrote

How to use md5 algorithm in GoLang

In this article, you are going to learn about how to use an md5 algorithm in the Go language. MD5 is an algorithm that is used to compute a hash value. Though it is cryptographically broken, it is still used widely. This algorithm produces a 128-bit hash value. In the Go language, there’s a package […]

January 14, 2022 in Code examples & GoLang
Deven
Deven wrote

What is time differences in GoLang?

In this article, you are going to learn about what is time differences in the Go language. GoLang provides time packages to work with the time and in this package, you will get the functionality to determine a time and also see it. We will see the time differences between two variables with the help […]

January 13, 2022 in Code examples & GoLang
Deven
Deven wrote

How to use a pointer in a function in GoLang

In this article, you will learn about how to use a pointer in a function in the Go language. A pointer is nothing but an object that stores a memory address. Like many programming languages, the Go language also has the functionality of a pointer. In the Go language, pointers are used as a variable […]

January 13, 2022 in Code examples & GoLang
Deven
Deven wrote

Learn How to make JSON POST request in GoLang

In this article, you will learn about how to make JSON POST requests in the Go Language. JSON refers to the JavaScript Object Notation which is widely used in web development to transmit data. It is lightweight and human-readable. In the Go language, you can make a JSON POST request but to do so you […]

December 14, 2021 in Code examples & GoLang
Deven
Deven wrote

Learn How to read input from STDIN in Golang

In this article, you are going to learn about how to read input from STDIN in the Go language. In many programming languages, you can read data from a console and see the output. The Go language is not out of that. You can also read input from STDIN. To do so, you need to […]

December 14, 2021 in Code examples & GoLang
Deven
Deven wrote

Learn How to compare slices in Golang

In this article, you will learn about how to compare slices in the Go language. In Go language, slice stores a similar type of element which is a sequence of variable length. It is similar to an array but the main difference is the size of a slice can be resized on the other hand […]

December 14, 2021 in Code examples & GoLang
Deven
Deven wrote

Learn How to print in console in Golang

In this article, you are going to learn about how to print in console in the Go language. Print data in the console is a part and parcel of a programmer’s life. While writing code for a specific program, you often need to see whether the code is running perfectly or not before launching it […]

December 14, 2021 in Code examples & GoLang
Deven
Deven wrote

Learn How to do typecasting in Golang

In this article, you are going to learn about how to do typecasting in the Go language. Typecasting refers to the term of assigning the value of one data type to another. It is also known as type conversion. You can generally do type conversion in two ways – implicit type conversion and explicit type […]

December 14, 2021 in Code examples
Deven
Deven wrote

Learn How to use list in Golang

In this article, you will learn about how to use the list in the Go language. In the Go language, lists are referred to as linked lists which is one of the most important data structures used today. If you want to use the list in the Go language you need to import the list […]

December 14, 2021 in Code examples
Deven
Deven wrote

Learn How to print Substring in Golang

In this article, you will learn about how to print Substring in the Go language. In the Go language, strings are nothing but a slice of bytes that is immutable. You can easily generate a substring in the Go language. It is a part of String. Before jump into generating a substring from a string, […]

December 14, 2021 in Code examples & GoLang
Deven
Deven wrote

Learn How to check if key exists in Map in Golang

In this article, you will learn about how to check if a key exists in a map in the Go language. Go language provides a built-in associative data type named Map which is basically a collection of key-value pairs. On the map, you can retrieve, delete or update values with the help of keys. As […]

December 14, 2021 in Code examples & GoLang