Sabid Ansari has Published 150 Articles

Compressing a File in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:54:43

949 Views

Data compression is a process of reducing the size of data in order to save space or transmit data faster. Golang provides several libraries for compressing and decompressing data. In this article, we will discuss how to compress a file in Golang using the "compress/gzip" package. What is gzip Compression? ... Read More

Composition in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:53:59

6K+ Views

Composition is a powerful concept in object-oriented programming that allows creating complex types by combining smaller, simpler types. It enables building new types that have the functionality of several existing types, without the need to inherit from them. In Go, composition is achieved using struct embedding, a language feature that ... Read More

Comparison between Go & Node.js

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:53:13

297 Views

When it comes to choosing the right language for a project, developers often compare different programming languages to find the best fit. In this article, we will compare two popular programming languages, Go and Node.js, to help you make an informed decision. Comparison between Go & Node.js Go and Node.js ... Read More

Comparing Pointers in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:51:53

2K+ Views

Pointers are one of the most important concepts in Golang. They are used to reference a memory location and are frequently used in programming to improve performance and memory usage. In Golang, pointers are represented by an asterisk (*) followed by the type of the variable being pointed to. Comparing ... Read More

Comparing Maps in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:50:09

4K+ Views

Maps in Golang are unordered collections of key-value pairs. They are widely used in Golang programming due to their flexibility and ease of use. In many cases, it may be necessary to compare maps to check if they are equal or not. In this article, we will explore the different ... Read More

Compare Println vs Printf in Golang with Examples

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:49:27

3K+ Views

In Golang, printing messages to the console is a common task for debugging and logging purposes. There are two main ways to print messages to the console: using Println and Printf. In this article, we will compare these two methods and explore when it is appropriate to use each one. ... Read More

Combining Conditional Statements in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:48:49

2K+ Views

Conditional statements in programming are used to execute different sets of instructions based on a condition. In Golang, we have two types of conditional statements, if and switch. In this article, we will focus on how to combine conditional statements in Golang. Combining conditional statements in Golang allows us to ... Read More

Cmplx Package in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:47:28

295 Views

Golang is a popular programming language with a wide range of standard libraries that allow programmers to perform complex tasks with ease. The cmplx package is one such library that offers complex number operations in Go. In this article, we will explore the cmplx package, its functions, and how to ... Read More

Checking Slice of bytes for equality under Unicode case folding in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:46:40

291 Views

In Golang, byte slices are widely used to store and manipulate binary data. When comparing two byte slices, it is important to take into account Unicode case folding. Unicode case folding is the process of converting characters to a common form, which makes them easier to compare. In this article, ... Read More

Checking if structure is empty or not in Golang

Sabid Ansari

Sabid Ansari

Updated on 07-Apr-2023 10:46:06

3K+ Views

In Go, structures are used to define custom data types that can hold multiple fields of different data types. Sometimes, it is necessary to check if a structure is empty or not. An empty structure is one that has all of its fields set to their zero values. In this ... Read More

Advertisements