archive

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package archive extracts the tar.gz and zip archives upstreams publish. Extraction is defensive: every entry must stay inside the destination — including where a link points — and only the owner-executable bit is preserved from the archive's permissions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(src, dst, name string, strip int) error

Extract unpacks src into dst based on name's extension, dropping strip leading path components from every member (entries that do not have that many components are skipped, as tar --strip-components does). dst must already exist and should be empty.

A compressed artifact is smaller than what it becomes, sometimes by a great deal, so the write that runs the filesystem out of room is usually one of these. That failure is named rather than passed on as whatever syscall noticed it: see diag.DiskFull.

Types

This section is empty.

Jump to

Keyboard shortcuts

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