Documentation ¶
Index ¶
Constants ¶
const ( NoCompression = gzip.NoCompression BestSpeed = gzip.BestSpeed BestCompression = gzip.BestCompression DefaultCompression = gzip.DefaultCompression HuffmanOnly = gzip.HuffmanOnly )
These constants are copied from the flate package, so that code that imports "archiver" does not also have to import "compress/gzip".
Variables ¶
This section is empty.
Functions ¶
func GzipCompress ¶
GzipCompress fronts tar with a gzip compression stream.
func GzipDecompress ¶
GzipDecompress fronts tar with a gzip decompression stream.
func Tar ¶
Tar takes a source and a writers and walks 'source' writing each file found to the tar writer. It * skips root * maintains empty folders * does not follow (symbolic) links * respects a .gitignore if it's found in the directory root
Types ¶
type TarOption ¶
type TarOption func(*tarOptions)
func ArchiveGitRepo ¶
func ArchiveGitRepo() TarOption
ArchiveGitRepo is a shorthand for HonorGitIgnore and IgnoreDotGit
func CompressionLevel ¶
CompressionLevel allows users to the compression level of gzip
func HonorGitIgnore ¶
func HonorGitIgnore() TarOption
HonorGitIgnore will look for a .gitignore file in '.', parse it, and only archive files that are not matched by a rule in this .gitignore file. The current implementation does not support multiple .gitignore files in multiple folders.
func IgnoreDotGit ¶
func IgnoreDotGit() TarOption
IgnoreDotGit does not archive any '.git' folders in any subdirectories.