Easily Switch Go Version with GVM
There are various challenge in managing multiple golang microservice. One of them is develop the service with right golang version. I’ve work on a legacy service that set with go1.16. But the thing is I have go1.23. Without using same version, it is painful just to start in local. I have to run go mod vendor, met incompatibilities, go get, go mod vendor, broken there broken here.. Waste of time!...
Benchmark API Performance with WRK: A Brief Guide
Fellas, imagine you’ve built a powerful API. It perform well at first. No sign of sluggish, your users is happy as the app feels smooth. The business is thriving, your user base grows. Things start slowing down. Loading after click button take longer, and sometimes, the server crashes returning error. Looking at the server metric, it’s your API that doesn’t run as fast as your first deployment. The problem, you notice that the API goes slow only during high concurrent requests....
Resolve Port Already in Use
Port conflict usually happen whenever a service try to run and listen to a specific port while another server currently utilizing it. For those who manage multiple service repository, this could be quite common. The simplest way is to search and terminate the binary. But what if the binary stalled or we have no idea where did we ran it. No worry, with a simple command, we can figure it out in less than a minute!...
Measure Code Performance With Code Benchmark in Go
Golang provide a way to know our code efficiency by benchmark our code. By benchmarking our code, we able to see how fast our code can run and even gain more insight. An efficient code displayed from the resource required to complete it execution. The faster it can run, the better. The lower resource required, the better. This concept also applied for codes that run with serverless platform such as AWS Lambda or Google Cloud Function....
How to Delete Multiple Local Git Branches
For you, productive engineer, who dedicate a lot of time for a repo. Have you clean your git branch locally? Just like our home, a project’s local branch need decluttering too. In my point of view, I’d rather see clear git branch locally to help me find any unmerged branch. Or simply pursue peace of mind. Since Git doesn’t have a built in feature to delete multiple git branch in local project, deleting many branches in your local Git project might take you a while....