Golang
Prevent race condition in Go
When working with files or databases, or anything that relates to write permission, if we want to implement concurrency we need to implement lock. Because if we don’t, the data will be mess up by running concurrency.
So in Go, there is a couple of ways to do it like with mutex or using channel. In this post, we will use mutex for…