util

package
v0.0.0-...-e43c64b Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, key []byte) ([]byte, error)

Decrypt decrypt text with a key

func Encrypt

func Encrypt(plaintext []byte, key []byte) ([]byte, error)

Encrypt encrypt text with a key

func FilterFiles

func FilterFiles(files, filters []string) []string

FilterFiles filters files list based on specific sub-strings

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes.

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

GenerateRandomString returns a securely generated random string.

func GenerateUUID4

func GenerateUUID4() string

GenerateUUID4 create a UUID

func InArray

func InArray(val interface{}, array interface{}) bool

InArray check if value is on array

func ListFiles

func ListFiles(basePath string) []string

ListFiles lists all files inside a dir

func ReadFile

func ReadFile(path string) string

ReadFile get the file content

func Unset

func Unset(a []string, i int) []string

Unset remove element at position i

Types

This section is empty.

Jump to

Keyboard shortcuts

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