Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterFileInfo ¶
FilterFileInfo filters the given URL's zip file and returns all file names on which the given predicate applies.
func FilterZipContent ¶
FilterZipContent filters the given URL's zip file and returns all file contents on which the given predicate applies.
Types ¶
type Zipred ¶
type Zipred interface { // URL to download the archive from URL() string // Predicate indicates if the given file should be read or not. // It is to return a zero string to discard the file, otherwise the key name. // If error is nonempty, the download is aborted and the error is passed on. Predicate(fileInfo os.FileInfo) (key string, err error) // Done indicates if enough data has been read and the download can be aborted ahead of the EOF. // isEOF is true if the end of the zip file has been reached. // If error is nonempty, the download is aborted and the error is passed on. Done(isEOF bool) (finish bool, err error) }
Zipred allows the implementation of a context that dynamically defines the boundaries of the zip filtering.
Click to show internal directories.
Click to hide internal directories.