只需两行代码即可自动将go.mod 中的所有依赖升级至最新

go get -d -u -t ./...

go mod tidy

可以看到所有依赖都自动升级了