Exploring bulkWriteMongoDB has many interesting built-in methods, and one of them is bulkWrite, which allows batch processing of write operations in a specified order. This method has been available since version 3.2. The syntax of bulkWrite is simple: db.collection.bu...Jun 8, 2023·2 min read
The way of docker clear disk spaceBefore I know, if the docker used too much disk space, we just ran this command to remove all stoped containers, dangling images and build cache from old images: docker system prune It will tell you to confirm that you want to delete all of them, th...Sep 12, 2022·1 min read
how to hot reload for golang web applicationThere are tons of ways to hot reload a golang web application or golang program. I choose gin to do the hot reload. Firstly install the gin in GOPATH/bin: go get github.com/codegangsta/gin Basic usage If we run a gin( the same name, but it is the we...Aug 13, 2022·1 min read
How to solve: unbound breakpoints in vscode to debug through dockerWhile I was working on some new project, then I found a weird thing that all breakpoints in vscode are unbound.Everything looks good, but the breakpoints did not work all the time.After looking into many websites, I still could not find the reason to...May 5, 2022·1 min read