util

package
v0.0.0-...-fc9a6ea Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountBinary

func ByteCountBinary(b int64) string

ByteCountBinary - Pretty print byte size

func ChmodR

func ChmodR(path string, filePerm, dirPerm os.FileMode) error

ChmodR - Recursively chmod

func CopyFile

func CopyFile(srcPath, dstPath string) (err error)

Convenience function for copying a file

func Decrypt

func Decrypt(data []byte, key []byte) []byte

Decrypt a command

func Encrypt

func Encrypt(data []byte, key []byte, iv []byte) []byte

Encrypt the results

func GunzipBuf

func GunzipBuf(data []byte) []byte

GunzipBuf - Gunzip a buffer

func GzipBuf

func GzipBuf(data []byte) []byte

GzipBuf - Gzip a buffer

func ReadFileFromTarGz

func ReadFileFromTarGz(archivePath, tarPath string) ([]byte, error)

func ReadFileFromTarGzArchive

func ReadFileFromTarGzArchive(source io.Reader, tarPath string) ([]byte, error)

ReadFileFromTarGz - Read a file from a tar.gz file in-memory

func ReadFileFromTarGzMemory

func ReadFileFromTarGzMemory(archiveData []byte, tarPath string) ([]byte, error)

func ResolvePath

func ResolvePath(in string) string

ResolvePath - Resolve a path from an assumed root path

Types

This section is empty.

Jump to

Keyboard shortcuts

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