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

FileEntry

Overview

FileEntry is a named file for archive creation.

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

FileEntry is a type exported by gox. Methods on this type are documented separately.

Signature

go
type FileEntry struct {
	Name string
	Data []byte
}

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"

entry := archive.FileEntry{Name: "readme.txt", Mode: 0644, Body: []byte("hello")}

Example

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

entry := archive.FileEntry{Name: "readme.txt", Mode: 0644, Body: []byte("hello")}

Tips

Browse methods on this type in the sidebar for handler-style APIs and options structs.

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