# README
zip
Package zip process a compressed file read, write and clone it
Install
$> go get github.com/gofast-pkg/zip@latest
Usage
import github.com/gofast-pkg/zip
func main() {
file, err := os.Open(testReadCloserZipFile)
if err != nil {
panic(err)
}
defer file.Close()
r, err := zip.NewReader(file)
if err != nil {
log.Fatal(err)
}
// Iterate through the files in the archive,
for i := 0; i < r.NFiles(); i++ {
var content []byte
if content, err = r.ContentFile(i); err != nil {
panic(err)
}
// do something
}
}
Check the go documentation for more details.
Contributing
:grey_exclamation: Use issues for everything
Read more informations with the CONTRIBUTING_GUIDE
For all changes, please update the CHANGELOG.txt file by replacing the existant content.
Thank you :pray: :+1:
Made with contrib.rocks.
Licence
# Packages
No description provided by the author
# Functions
NewReader returns a Reader interface It receives a io.ReadCloser interface from http request or file.
# Interfaces
Reader is the interface that wraps the basic methods to process a compressed file / body
go:generate mockery --name=Reader --output=mocks --filename=reader.go --outpkg=mocks.