gounzip

package module
v0.0.1-20220719-0001 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 6 Imported by: 0

README

Package go-unzip

Package go-unzip provides a very simple library to extract zip archive

Installation

go get -u github.com/kyaxcorp/go-unzip

Examples

package main

import (
	"fmt"
	"github.com/kyaxcorp/go-unzip"
)

func main() {
	uz := unzip.New()

	files, err := uz.Extract("./data/file.zip", "./data/directory")
	if err != nil {
		fmt.Println(err)
	}

	fmt.Printf("extracted files count: %d", len(files))
	fmt.Printf("files list: %v", files)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Unzip

type Unzip struct {
}

func New

func New() *Unzip

func (Unzip) Extract

func (uz Unzip) Extract(source, destination string) ([]string, error)

Jump to

Keyboard shortcuts

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