targz

package module
v0.0.0-...-3afc79e Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 9 Imported by: 0

README

This package exists for archival reasons only. It is not working correctly and not intended to be maintained in any way, please do not use it.

Targz

Library for packaging folders in tar.gz archives.

Documentation on godoc.org

Installation

Installing using go get is the easiest.

go get github.com/m90/targz

Usage

The API is really simple, there is only one method.

  • Compress
Create an archive containing a folder
import "github.com/m90/targz"
...
err := targz.Compress("my_folder", "my_file.tar.gz")

Contributing

All contributions are welcome! See CONTRIBUTING for more info.

License

Licensed under MIT license. See LICENSE for more information.

Documentation

Overview

Package targz contains methods to create and extract tar gz archives.

Usage (discarding potential errors):

targz.Compress("path/to/the/directory/to/compress", "my_archive.tar.gz")

This creates an archive in ./my_archive.tar.gz with the folder "compress" (last in the path).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(inputFilePath, outputFilePath string) (err error)

Compress creates a archive from the folder inputFilePath points to in the file outputFilePath points to. Only adds the last directory in inputFilePath to the archive, not the whole path. It tries to create the directory structure outputFilePath contains if it doesn't exist. It returns potential errors to be checked or nil if everything works.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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