method chaining

By yuseferi, 28 January, 2022

Although it's not an idiom in Golang to do method changing in some cases that would be useful if you chain your method.

The reason behind it why it's not idiomatic is different exception handling, in another programming language in terms of exceptions in one of the chan functions it throws the exception and other methods won't get run. 
in this article, I'm going to show how we can implement it in Golang. 

let's suppose that I want to have an app registry that wanted to add clients dynamically,