up

package
v0.0.0-...-aa36cb2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd() *cobra.Command

Types

type DirTargzipper

type DirTargzipper struct {
	// contains filtered or unexported fields
}

DirTargzipper targz's a directory and respects ignore files. By default, it will respect ignore patterns present in any .gitignore and .dockerignore files.

func NewDirTargzipper

func NewDirTargzipper(sourcePath string, writer io.Writer, opts ...DirTargzipperOption) (*DirTargzipper, error)

NewDirTargzipper creates a new targzipper that compresses a directory.

func (*DirTargzipper) Run

func (pt *DirTargzipper) Run() iter.Seq2[Progress, error]

Run the compression operation. The iterator returned yields information about the progress of the operation.

type DirTargzipperOption

type DirTargzipperOption func(*DirTargzipper)

DirTargzipperOption configures a DirTargzipper.

func WithIgnoreFiles

func WithIgnoreFiles(ignoreFiles []string) DirTargzipperOption

WithIgnoreFiles configures which ignore files to respect during compression.

type Progress

type Progress struct {
	// Percentage of the operation that is complete.
	Percentage float64
	// Processed bytes thus far.
	Processed int64
	// Total number of bytes to process.
	Total int64
	// Filename being processed. Could be empty if this is the begining or end of the compression operation.
	Filename string
	// Done is true when compression is complete.
	Done bool
}

Progress of the compression.

Jump to

Keyboard shortcuts

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