Credits to Brett Jordan (https://unsplash.com/photos/LPZy4da9aRo)

What is this Keyspace Notifications?


Credits to Ben Harritt (https://unsplash.com/photos/4W92z8cNQ_c)

Synchronous Process

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


Credits to alexander ehrenhöfer (https://unsplash.com/photos/yI4pFmN9ges)

Given Problem Statement and Solution

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


Credits to Jamie Street (https://unsplash.com/photos/vcn2ndJ5LwE)

Prolog / Background


Credits to Greyson Joralemon (https://unsplash.com/photos/9IBqihqhuHc)
  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 (https://unsplash.com/photos/_4NF4Jppx-c)
  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 (https://unsplash.com/photos/1vZAezBEADw)
  1. Function in your own package
  2. Function imported (from library or stuff) outside of your project


Credits to NeONBRAND (https://unsplash.com/photos/60krlMMeWxU)


Credits to Markus Spiske at https://unsplash.com/photos/Skf7HxARcoc

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