title: what is the purpose of `go mod vendor` command?
body: <p>The <a href="https://golang.org/ref/mod#go-mod-vendor" rel="noreferrer">documentation</a> says,</p>
  <blockquote>
  <p>The go mod vendor command constructs a directory named vendor in the
  main module's root directory that contains copies of all packages
  needed to support builds and tests of packages in the main module.
  Packages that are only imported by tests of packages outside the main
  module are not included.</p>
  </blockquote>
  <p><a href="https://golangbyexample.com/packages-modules-go-second/" rel="noreferrer">golangbyexample</a> says:</p>
  <blockquote>
  <p>You can also check in the vendor directory to your VCS (Version
  Control System). This becomes useful in sense that none of the
  dependency needs to be downloaded at run time as it is already present
  in the vendor folder checked into VCS</p>
  </blockquote>
  <p>I think modules (<code>go.mod</code>,<code>go.sum</code>) take care of the versioning. I also think that dependencies are only downloaded when I run the program for the first time.</p>
  <p>So, how is the command <code>go mod vendor</code> useful? What is its purpose or use case?</p>