Skip to content

Instantly share code, notes, and snippets.

View jmooring's full-sized avatar

Joe Mooring jmooring

View GitHub Profile
// Untar takes a destination path and a reader; a tar reader loops over the tarfile
// creating the file structure at 'dst' along the way, and writing any files
func Untar(dst string, r io.Reader) error {
gzr, err := gzip.NewReader(r)
if err != nil {
return err
}
defer gzr.Close()