func Find(reader *zip.Reader, pattern string) ([]string, error) {
	// path.Match will only return an error if the pattern is not
	// valid (*and* the supplied name is not empty, hence "check").
	if _, err := path.Match(pattern, "check"); err != nil {
		return nil, err
	}
	var matches []string
	for _, zipFile := range reader.File {
		cleanPath := path.Clean(zipFile.Name)
		baseName := path.Base(cleanPath)
		if match, _ := path.Match(pattern, baseName); match {
			matches = append(matches, cleanPath)
		}
	}
	return matches, nil
}
// Find returns the cleaned path of every file in the supplied zip reader whose
// base name matches the supplied pattern, which is interpreted as in path.Match.
Find returns the cleaned path of every file in the supplied zip reader whose
base name matches the supplied pattern, which is interpreted as in path.Match.
// Find returns the cleaned path of every file in the supplied zip reader whose // base name matches the supplied pattern which is interpreted as in path . Match .
func Find(reader *zip.Reader, pattern string) ([]string, error) {
	if _, err := path.Match(pattern, "check"); err != nil {
		return nil, err
	}
	var matches []string
	for _, zipFile := range reader.File {
		cleanPath := path.Clean(zipFile.Name)
		baseName := path.Base(cleanPath)
		if match, _ := path.Match(pattern, baseName); match {
			matches = append(matches, cleanPath)
		}
	}
	return matches, nil
}
func Find ( reader * zip . Reader , pattern string ) ( [ ] string , error ) { if _ , err := path . Match ( pattern , " " ) ; err != nil { return nil , err } var matches [ ] string for _ , zipFile := range reader . File { cleanPath := path . Clean ( zipFile . Name ) baseName := path . Base ( cleanPath ) if match , _ := path . Match ( pattern , baseName ) ; match { matches = append ( matches , cleanPath ) } } return matches , nil }
Find returns the cleaned path of every file in the supplied zip reader whose
base name matches the supplied pattern, which is interpreted as in path.Match.
Find returns the cleaned path of every file in the supplied zip reader whose base name matches the supplied pattern which is interpreted as in path . Match .
// path.Match will only return an error if the pattern is not // valid (*and* the supplied name is not empty, hence "check").