Golang Mistakes: #2 Misusing Init() Functions

misusing_init_functions

As Go developers, We find many built-in features handy when we are coding in a real life. But we sometimes forget, using those built-in features too extensively which may lead to certain pitfalls. Most of the time, these pitfalls occur when we misuse those features. Let’s discuss a built-in feature of Golang which may lead […]

Go Pointers – Immutability Vs Efficiency

Pointers are a fundamental and necessary aspect of Golang. They allow us to manipulate memory and data structures from a simple level, without needing to know the specifics of some more abstract data structures. This article will cover Go pointers, their use in stacks and heaps, immutability vs efficiency as well as pointer types (primitives […]

Golang Mistakes: #1 Maps and Memory Leaks

When it comes to software development we always want to ensure our code never uses excessive memory when a function finishes its work. That’s why some of the language features like garbage collection (GC) were implemented so that memory leaks do not occur. Also as a beginner software engineer, who just learning to code in […]

How and when to use sync.WaitGroup in Golang

golang waitgroup

Golang is known for its first-class support for concurrency, or the ability for a program to deal with multiple things at once. Running code concurrently is becoming a more critical part of programming as computers move from running a single code stream faster to running more streams simultaneously. Goroutines solve the problem of running concurrent […]

Generics In Golang 1.18

When we start using Golang, The simplicity of the language and its awesome way to handle threads(goroutine), and also its speed, make us happy that our code works so fast that sometimes the result came within a nanosecond(ns). Apart from these good sides when we work on a project we sometimes copy-paste lots of code, […]

Worker Pool in Golang

Tags: #advance #topic #golang #goroutine #channels #workerpool #threadpool Often we end up with some work which is so time-consuming that if we’re able to assign, multiple person/worker, to do that job the execution time will reduce the time which will save a lot of time for those particular tasks. Today we’re going to solve this […]

Why Golang?

When we start learning a new language, we try to find the purpose of the language first so that we can decide if we’re going to use that language in our project or not. So when starting with Go, it’s common that you’ll hear that **” it’s a systems language”** as this was one of […]

Getting TestCase Based I/O Without Any Loop In Golang

no-loop

Sometimes interview questions come with some twist like Solve this problem without using any loops So today I will explain how to solve general input/output (i/o) with test cases problem where special rule defines as saying “Do not use any Loop statement”. We’re going to solve this in Golang. When this type of problem was […]

Reverse a linked list using Golang

As we start coding and slowly learning about Data Structures(DS), we come across a very famous linear data structure which is known as a linked list. Linked lists and their related questions are quite popular in interviewers who love problem-solving. What is a Linked List? A linked list is a common linear data structure. its […]

Installing Multiple Version of Golang using GoEnv

Often we need a different version of go according to specific projects. There are different options we have like we can use Docker for our specific project’s need(we can talk about that in a different blog post). There are several other options but in this blog, we will talk about goenv. Prerequisites: git We’re using […]