MAMostafa Asgariinreturnfn.com·Aug 20, 2021 · 4 min readState Design Pattern: Let's build a circuit breakerDefinition of State pattern: The state pattern is a behavioral software design pattern that allows an object to alter its behavior when its internal state changes. This pattern is close to the concept of finite-state machines. The state pattern can ...00
MAMostafa Asgariinreturnfn.com·Jul 15, 2021 · 3 min readtunny: A goroutine pool for GoTunny is a Golang library for spawning and managing a goroutine pool, allowing you to limit work coming from any number of goroutines with a synchronous API. A fixed goroutine pool is helpful when you have work coming from an arbitrary number of asyn...00
MAMostafa Asgariinreturnfn.com·Jul 3, 2021 · 3 min readDraw Github's contribution activity using GoI wanted to know how image package works and how can I draw images in Go language. So I decided to draw Github's contribution activity that you find in each user's profile. Here is my contribution activity calendar in Github: Show me the code First...00
MAMostafa Asgariinreturnfn.com·May 30, 2021 · 3 min readLet's build a concurrent file downloader in GoGo is an amazing language. Though it is notoriously simple, with bare minimal features compare to other modern languages like Koltin and Scala, it has great concurrency capabilities. In this article, we are going to see how we can write a complete co...00