Credits to Brett Jordan (

What is this Keyspace Notifications?

Credits to Ben Harritt (

Synchronous Process

func DoSomethingHeavy(id int) {  time.Sleep(1 * time.Second)
// you can print the id of…

Credits to alexander ehrenhöfer (

Given Problem Statement and Solution

  1. You have multiple binaries that is running a cron…

Credits to Jamie Street (

Prolog / Background

Credits to Greyson Joralemon (
  1. Interface contains nil but not considered as nil
  2. Slice and Map are reference type
  3. Child Go routine and Parent
  4. Don’t use basic type string / int / others for context key

Interface Holding Nil Value, But Not Nil

var i interface{}
var pint *int
i = pint
fmt.Println(pint, pint == nil, i, i == nil)
<nil> true <nil> false

Credits to Łukasz Rawa (
  1. We need to create a struct that implements the “retriable” interface, which consist of “Exec() error” method.
  2. Then we can create a new retrier function with object based on the previous struct, configured with our desired maximum attempt and logger if needed (by New command)
  3. Invoke the action to do the execution and automatic retry upon failing the Exec method (by Start() command)

Credits to Tamara Gak (
  1. Function in your own package
  2. Function imported (from library or stuff) outside of your project

Credits to NeONBRAND (

Credits to Markus Spiske at

So, What is Closure in Golang?

Image example from the github documentation

Creating the API

  1. Get user detail based on id
  2. Post and create new user based on JSON body sent by request

Aditya Rama

Fellow Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store