add a comment to findFiles

This commit is contained in:
Denis Bilenko 2025-03-05 11:51:59 +01:00
parent d79e0db71b
commit 4a2485fcc9
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ const (
nameKey = "Name:" nameKey = "Name:"
) )
// findFiles returns a slice with a *zip.File for every filename in the arguments slice.
// The order of the return value matches the order of the arguments.
// If not found, the corresponding entry is nil.
func findFiles(r *zip.ReadCloser, files ...string) []*zip.File { func findFiles(r *zip.ReadCloser, files ...string) []*zip.File {
found := 0 found := 0
result := make([]*zip.File, len(files)) result := make([]*zip.File, len(files))