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
Trust: Jean de Klerk <>
Run-TryBot: Jean de Klerk <>
TryBot-Result: Go Bot <>
Reviewed-by: Jay Conrod <>
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 @@
 		if isVendoredPackage(p) {
+			// Skip files in vendored packages.
 			addError(p, true, errVendored)
 		if inSubmodule(p) {
+			// Skip submodule files.
 			addError(p, true, errSubmoduleFile)