cmd/pkgsite: list modules read-only

Add -mod=readonly to the `go list` command that is run
so the command will work with vendor directories.

Change-Id: I5baa4b93f29f2c760d2fed03a3ea29f8382002f3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/425494
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/cmd/pkgsite/main.go b/cmd/pkgsite/main.go
index 659fcdc..c273c82 100644
--- a/cmd/pkgsite/main.go
+++ b/cmd/pkgsite/main.go
@@ -242,7 +242,7 @@
 var listModules = _listModules
 
 func _listModules(dir string) ([]listedMod, error) {
-	out, err := runGo(dir, "list", "-json", "-m", "all")
+	out, err := runGo(dir, "list", "-json", "-m", "-mod", "readonly", "all")
 	if err != nil {
 		return nil, err
 	}