zip: add bit more information about what checkFiles does

This CL adds a headstone to checkFiles in the form of additional documentation,
which should hopefully help future developers.

Change-Id: I7957766fc78da45007cbb4e7e3ed59ad2bada4c5
Reviewed-on: https://go-review.googlesource.com/c/mod/+/338669
Trust: Jean de Klerk <deklerk@google.com>
Run-TryBot: Jean de Klerk <deklerk@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
diff --git a/zip/zip.go b/zip/zip.go
index 5b401ad..0f0e6a3 100644
--- a/zip/zip.go
+++ b/zip/zip.go
@@ -192,8 +192,10 @@
 }
 
 // checkFiles implements CheckFiles and also returns lists of valid files and
-// their sizes, corresponding to cf.Valid. These lists are used in Crewate to
-// avoid repeated calls to File.Lstat.
+// their sizes, corresponding to cf.Valid. It omits files in submodules, files
+// in vendored packages, symlinked files, and various other unwanted files.
+//
+// The lists returned are used in Create to avoid repeated calls to File.Lstat.
 func checkFiles(files []File) (cf CheckedFiles, validFiles []File, validSizes []int64) {
 	errPaths := make(map[string]struct{})
 	addError := func(path string, omitted bool, err error) {
@@ -254,10 +256,12 @@
 			continue
 		}
 		if isVendoredPackage(p) {
+			// Skip files in vendored packages.
 			addError(p, true, errVendored)
 			continue
 		}
 		if inSubmodule(p) {
+			// Skip submodule files.
 			addError(p, true, errSubmoduleFile)
 			continue
 		}