archiver

package module
v0.0.0-...-e10b574 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TarXZFormat format = "tar.xz"
	TarGZFormat format = "tar.gz"
	ZipFormat   format = "zip"
)
View Source
var UnknownFormat = errors.New("unknown format")

Functions

func Format

func Format(s string) (format, error)

func FormatDefault

func FormatDefault(s string, def format) (format, error)

func Package

func Package(targetFormat format, target string, files []string) error

Types

type Archiver

type Archiver interface {
	Add(file string, name string) error
	AddAll(files []string, namer func(string) string) error
	Close() error
}

func NewTar

func NewTar(target string, filter func(io.WriteCloser) (io.WriteCloser, error)) (Archiver, error)

func NewTarGZ

func NewTarGZ(target string) (Archiver, error)

func NewTarXZ

func NewTarXZ(target string) (Archiver, error)

func NewZip

func NewZip(target string) (Archiver, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL