Skip to content
Node: archivergithub.com/sahilkhaire/gox/archive

ZipCreateEntries

Overview

ZipCreateEntries builds a zip archive from file entries.

Part of the archive package — Node.js analog: archiver.

Signature

go
func ZipCreateEntries(entries []FileEntry) ([]byte, error)

Compare: Node.js · Standard Go · gox

js
// Typical archiver pattern in Node.js
go
// archive/zip or archive/tar from stdlib
go
import "github.com/sahilkhaire/gox/archive"

err := archive.ZipCreateEntries(ctx, w, entries)

Example

go
import "github.com/sahilkhaire/gox/archive"

err := archive.ZipCreateEntries(ctx, w, entries)

Tips

Import github.com/sahilkhaire/gox/archive and call ZipCreateEntries directly. See the comparison below for the standard library equivalent.

Standard library alternative

gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.

Back to archive package overview

MIT Licensed · Built for Node.js developers moving to Go