Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptySubdir = errors.New("empty tarball subdirectory")
Functions ¶
func Extract ¶
Extract reads the tarball from r and writes it into dir. This was copied and modified from golang.org/x/build/internal/untar.
func Subdir ¶ added in v0.9.0
Subdir reads the tarball from r and 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 ¶
Click to show internal directories.
Click to hide internal directories.