archive

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTarGz

func CreateTarGz(output string, files []string) error

CreateTarGz creates a gzip-compressed tar archive.

func CreateTarZlib

func CreateTarZlib(output string, files []string) error

CreateTarZlib creates a zlib-compressed tar archive.

func CreateZip

func CreateZip(output string, files []string) error

CreateZip creates a ZIP archive.

func ExtractArchive

func ExtractArchive(archivePath, dest string) error

ExtractArchive extracts an archive based on its extension.

func Run

func Run(opts ...Option) error

Run creates or extracts archives.

Types

type Config

type Config struct {
	Format  string
	Output  string
	Extract bool
	Files   []string
}

Config holds configuration for the archive command.

type Option

type Option func(*Config)

Option configures a Config.

func WithExtract

func WithExtract(extract bool) Option

func WithFiles

func WithFiles(files []string) Option

func WithFormat

func WithFormat(format string) Option

func WithOutput

func WithOutput(output string) Option

Jump to

Keyboard shortcuts

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