archive

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HardcodedIgnorePatterns = []string{

	".git",
	".git/**",
	".svn",
	".hg",

	".env",
	".env*",
	".env.*",
	"*.env",

	"credentials.json",
	"credentials.yaml",
	"secrets.yaml",
	"secrets.json",
	"*.key",
	"*.pem",
	"*.p12",
	"*.pfx",

	".idea",
	".vscode",
	".DS_Store",
	"Thumbs.db",

	"node_modules",
}

HardcodedIgnorePatterns are always excluded for security.

Functions

func CollectIgnorePatterns

func CollectIgnorePatterns(dir string) []string

CollectIgnorePatterns gathers ignore patterns from all sources.

func Create

func Create(srcDir, destPath string) error

Create creates a tar.gz archive of the directory, respecting ignore patterns.

func CreateZip

func CreateZip(srcDir string, w io.Writer) (int, error)

CreateZip writes a zip archive of srcDir into w, respecting the same ignore rules as Create (hardcoded security excludes + .gitignore + .dockerignore + .taufinityignore + taufinity.yaml).

Returns the number of files written. An empty source directory (zero files after filtering) is reported as an error so callers don't silently upload empty archives.

Types

This section is empty.

Jump to

Keyboard shortcuts

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