When buliding a Docker image, I know we can add a layer to cache dependencies. But the dependency needs to be built. This step is quite time-consuming, on my machine it takes about 30 seconds to build sqlite3 alone.
I also know I can use go build github.com/mattn/go-sqlite3 to build a specific dependency, but is there any way to pre-build all the dependencies list in go.mod?
I found the same question about this here, but there is no answer.