dump

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedOutputTypes = []string{"zip", "tar", "tar.sz", "tar.gz", "tar.xz", "tar.bz2", "tar.br", "tar.lz4", "tar.zst"}

Functions

func IsSubdir

func IsSubdir(upper, lower string) (bool, error)

func PrepareFileNameAndType

func PrepareFileNameAndType(argFile, argType string) (outFileName, outType string)

PrepareFileNameAndType prepares the output file name and type, if the type is not supported, it returns an empty "outType"

Types

type Dumper

type Dumper struct {
	Verbose bool
	// contains filtered or unexported fields
}

func NewDumper added in v1.25.0

func NewDumper(ctx context.Context, format string, output io.Writer) (*Dumper, error)

func (*Dumper) AddFileByPath added in v1.25.0

func (dumper *Dumper) AddFileByPath(filePath, absPath string) error

AddFileByPath adds a file by its filesystem path

func (*Dumper) AddFileByReader added in v1.25.0

func (dumper *Dumper) AddFileByReader(r io.Reader, info os.FileInfo, customName string) error

AddFileByReader adds a file's contents from a Reader

func (*Dumper) AddRecursiveExclude

func (dumper *Dumper) AddRecursiveExclude(insidePath, absPath string, excludes []string) error

func (*Dumper) Close added in v1.25.0

func (dumper *Dumper) Close() error

func (*Dumper) GlobalExcludeAbsPath

func (dumper *Dumper) GlobalExcludeAbsPath(absPaths ...string)

Jump to

Keyboard shortcuts

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