tools

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Black  color
	White  color
	Red    color
	Blue   color
	Green  color
	Yellow color
	Purple color
)

Functions

func ByteCountDecimal

func ByteCountDecimal(b int64) string

func GenRandStr

func GenRandStr(n int, join string) string

func GetAbsolutePaths

func GetAbsolutePaths(paths []string) []string

func GetInput

func GetInput(prompt string) string

func GetLocalIPs

func GetLocalIPs() (ips []string, err error)

GetLocalIPs returns all local ips

func HashFile

func HashFile(fileName string, algorithm string) (hash256 []byte, err error)

func IMOHashFile

func IMOHashFile(fileName string) (hash []byte, err error)

IMOHashFile returns imohash

func IMOHashFileFull

func IMOHashFileFull(fileName string) (hash []byte, err error)

IMOHashFileFull returns imohash of full file

func IsBlank

func IsBlank(s string) bool

func IsDir

func IsDir(path string) bool

func IsEmpty

func IsEmpty(s string) bool

func IsEmptyFolder

func IsEmptyFolder(folderPath string) (bool, error)

func IsFile

func IsFile(path string) bool

func LocalIP

func LocalIP() string

func MD5HashFile

func MD5HashFile(fileName string) (hash256 []byte, err error)

MD5HashFile returns MD5 hash

func Print

func Print(c color, v any)

func Println

func Println(c color, v any)

func SHA256

func SHA256(s string) string

SHA256 returns sha256 sum

func UnzipDirectory

func UnzipDirectory(destination string, source string) error

func XXHashFile

func XXHashFile(fileName string) (hash256 []byte, err error)

XXHashFile returns the xxhash of a file

func ZipDirectory

func ZipDirectory(destination string, source string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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