Makefile Example Usage

If you never used Makefile before, you better check out this article. You will find out what Makefile is and how it will be useful for you.

[Read More]

Profiling A Go App With pprof

Profiling an application is helpful to identify resource consumption at runtime. We can see which function consumes the most CPU or memory. We can see if our application is already efficient or not and then find a chance of improvement. In Go, there is pprof, a built-in library for profiling that we can easily use and integrate.

[Read More]

Distributed Tracing with Jaeger in Go

Distributed tracing is used by software engineers to monitor or debug their applications. It is very useful to find which process takes the most time or which function causes errors. One of the systems to do distributed tracing is Jaeger. This article will show you how to run Jaeger in the local environment and trace a Go application. What is distributed tracing? According to, distributed tracing is a method to profile and monitor applications, especially applications built using a microservice architecture. [Read More]

Golang Function Timeout With Context

Timeouts can be important for an application. It can limit how long is the maximum duration of a process. We can save resources by cancel further processes when timeout happened. We can use context to apply a timeout to a function call in Go.

[Read More]

Run PostgreSQL Database With Docker

Running PostgreSQL with docker is very useful for testing purposes. You can run it everywhere. You can create any testing data, use it then destroy it after testing is done. Integration testing and automation testing are made easy by it.

[Read More]

Zero Downtime Reload With Socketmaster

Nowadays, zero downtime reload is mandatory for most systems. Especially for the system that is accessed all the time. Stakeholders demand the high availability of the system. So it is bad if the system needs downtime for reloads even if it’s in milliseconds. Socketmaster is there to help your system reload with zero downtime.

[Read More]

Handle Panic in HTTP Server by Using Middleware in Go

If you have code in Go, most likely you have ever encountered a panic. Panic can stop your application if it is not recovered. Fortunately, in the Go HTTP server, there is already a panic recovery, so the server will continue to run if panic is encountered. But the client will not get any response from the server if a panic happens. It is good that you have your own panic recovery that responds with an error message.

[Read More]

Wait for Goroutine to Finish With WaitGroup

Goroutine is very useful to execute a process asynchronously. You can use multiple goroutines to run multiple processes at the same time. But what if you want to wait for the goroutines to finish before continue to the next process? You can use WaitGroup to wait for goroutines to finish.

[Read More]