encoderutils

package
v2.2.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 7 Imported by: 0

README

goutils/v2/encoderutils

The encoderutils package is a collection of utility functions designed to simplify common encoderutils tasks.


Table of contents


Functions

Unzip(string)
Unzip(string) error

Unzip unzips the specified zip file and extracts the contents of the zip file to the specified destination.

Parameters:

src: A string representing the path to the zip file.

dest: A string representing the path to the destination directory.

Returns:

error: An error if any issue occurs while trying to unzip the file.


Zip(string)
Zip(string) error

Zip creates a zip file from the specified source directory and saves it to the specified destination path.

Parameters:

srcDir: A string representing the path to the source directory.

destFile: A string representing the path to the destination zip file.

Returns:

error: An error if any issue occurs while trying to zip the file.


Installation

To use the goutils/v2/encoderutils package, you first need to install it. Follow the steps below to install via go get.

go get github.com/l50/goutils/v2/encoderutils

Usage

After installation, you can import the package in your Go project using the following import statement:

import "github.com/l50/goutils/v2/encoderutils"

Tests

To ensure the package is working correctly, run the following command to execute the tests for goutils/v2/encoderutils:

go test -v

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip

func Unzip(src, dest string) error

Unzip unzips the specified zip file and extracts the contents of the zip file to the specified destination.

**Parameters:**

src: A string representing the path to the zip file.

dest: A string representing the path to the destination directory.

**Returns:**

error: An error if any issue occurs while trying to unzip the file.

func Zip

func Zip(srcDir, destFile string) error

Zip creates a zip file from the specified source directory and saves it to the specified destination path.

**Parameters:**

srcDir: A string representing the path to the source directory.

destFile: A string representing the path to the destination zip file.

**Returns:**

error: An error if any issue occurs while trying to zip the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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