Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptySubdir = errors.New("empty tarball subdirectory")
Functions ¶
func Compress ¶
func Compress(dir string) io.ReadCloser
func Extract ¶
Extract reads the tarball from r and writes it into dir. Copied and modified from golang.org/x/build/internal/untar.
func ModifyHeaders ¶
func Subdir ¶
func Subdir(r *tar.Reader, subdir string) io.ReadCloser
Subdir reads the tarball from r and streams the files in the given subdirectory to the returned io.ReadCloser as a tarball with the subdirectory's path trimmed from each file's name.
If the subdirectory is empty or non-existent, the returned io.ReadCloser is closed with ErrEmptySubdir.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.