Help us shape the future of Go! Take the 2026 Go Developer Survey

tar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package tar implements the `tar` built-in.

Supports the GNU/BSD tar flag subset:

-c, --create        create a new archive
-x, --extract       extract files from an archive
-t, --list          list contents of an archive
-v, --verbose       verbose
-f, --file PATH     archive path ("-" = stdin/stdout)
-z, --gzip          gzip compress/decompress
-j, --bzip2         bzip2 compress/decompress (decompress only)
-J, --xz            xz compress/decompress
    --zstd          zstd compress/decompress
    --no-same-owner ignore owner/group on extract (always implied)
    --strip-components N  strip N leading path components on extract
-C DIR              change to DIR before any operation
--help              show this help and exit

Honors Context.Limits.MaxStringLength on any single member: a tar entry whose declared size exceeds the cap is rejected.

All file I/O routes through Context.FS; stdin via Context.Stdin; stdout via Context.Stdout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() command.Command

New returns the tar command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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