Golang Golang Implement Debounce logic in different ways There are multiple ways to implement Debounce Logic in Golang. I want to compare the differences and check which one is ... 2023.12.27 Golang
Golang Golang How to implement Debounce and how to use time.Timer properly timer.Timer is simple but it's not as straightforward to use it as it looks.What can we do with time.Timer?There are two... 2023.12.13 Golang
Golang Golang Which way is the best to declare array/slice Have you ever considered the best way to declare an array/slice in Golang? Golang offers several ways to declare it. It'... 2023.12.11 Golang
Golang Golang When should Atomic be used instead of Mutex? I have used sync.atomic for the first time in my work. It's lighter than Mutex. If the program requires speed and it doe... 2023.11.10 Golang
Golang Golang Unit testing with Gomega matcher A function result somehow needs to be compared in a unit test to know whether the function returns the expected value or... 2023.10.04 Golang
Golang Golang A good way to get struct data with gomega matcher It took me about 20 minutes to know the way to access a property in a struct that is passed by a channel in a unit test.... 2023.10.02 Golang
Golang Golang errors.Is() does not work for Custom error? How can a custom error implemented in Golang? Define struct and Error() method for it. Implement Is() method if errors.Is() needs to be used for the custom error. 2023.08.04 Golang
Golang Golang Mock File System for unit testing by afero It's often problematic to create a test directory or file on the actual file system because they are need to be deleted after each test. Don't stop it. Let's use afero package to do it on the memory. 2023.07.17 Golang
Golang Golang How to define gRPC message to contain mixed data type in an array Check the following post first if you have not prepared a dev-env for gRPC in Go lang.In this post, we will go through t... 2023.06.26 Golang
Golang Golang gRPC unary, stream, bidirectional RPC examples gRPC has 4 types of functions. This post covers all the functions to explain how to implement them. Let's a 2023.06.05 Golang