Documentation ¶
Overview ¶
Package zip exposes convenience functions to work with ZIP archives
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToZip ¶
AddToZip creates a source object (either a file, or a directory that will be recursively added) to a previously opened zip.Writer. The archive path of `source` is relative to the `rootSource` parameter.
func AnnotateAddToZip ¶ added in v1.3.0
func AnnotateAddToZip(zipWriter *zip.Writer, source string, rootSource string, annotator FileHeaderAnnotator, logger *logrus.Logger) error
AnnotateAddToZip is an extended Zip writer that accepts an annotation function to customize the FileHeader values written into the archive
Types ¶
type FileHeaderAnnotator ¶ added in v1.3.0
type FileHeaderAnnotator func(header *zip.FileHeader) (*zip.FileHeader, error)
FileHeaderAnnotator represents a callback function that accepts the current file being added to allow it to customize the ZIP archive values
Click to show internal directories.
Click to hide internal directories.