Ignoring how defer arguments are evaluated
In order to understand how arguments are processed using the defer keyword, let’s consider a specific example. Suppose we have a function that needs to execute two other functions, called foo and bar. Additionally, this function needs to handle some status information related to its execution. We can use the defer keyword to ensure that…

Using defer inside a loop
The defer keyword allows a function call to be postponed until the surrounding function has completed execution. This can be useful for reducing redundancy in code, such as when a resource needs to be closed after use. However, it’s important to be mindful of using defer within a loop, as it can have unintended consequences…
Thinking concurrency is always faster
Many developers mistakenly believe that a concurrent solution will always be faster than a sequential one, but this is not always the case. The performance of a solution depends on various factors, such as the efficiency of the concurrency structure, the parts that can be processed in parallel, and the level of contention among the…

Stripe Payment with Golang
In this blog post, I will discussed on the topic of stripe payment integration with Golang. Before that i will give brief introduction about this and move head to simple implementation. It is a famous payment gateway that helps in financial transaction between merchants and customers. It accepts 133+ countries currency. It is a powerful…
Not properly checking if a slice is empty
In the previous blog post we discussed about distinction between nil and empty slices. We have to clear about some notation, what is the idiomatic way to check if a slice contains elements? Not having clear answer can lead to subtle bugs. Let’s talk about the example, we call a getAmounts() function which returns a slice…

External Logging Feature in 01Cloud
An External Logging feature is a feature that is used to collect and store log data from various sources, such as servers, applications, and devices. Logging are typically designed to be deployed in a container orchestration platform such as Kubernetes and to work in concert with other tools such as log shippers, log aggregators, and…