utils

package
v0.2.0-dev Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToInt64

func BytesToInt64(buf []byte) int64

func CopyFile

func CopyFile(dst, src string) error

func DirFiles

func DirFiles(path string, count uint32) ([]string, error)

Get the total size of all files in a directory and subdirectories

func GetDirFreeSpace

func GetDirFreeSpace(dir string) (uint64, error)

func GetFileType

func GetFileType(fSrc string) (string, error)

func GetSysMemAvailable

func GetSysMemAvailable() (uint64, error)

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func InterfaceIsNIL

func InterfaceIsNIL(i interface{}) bool

InterfaceIsNIL returns the comparison between i and nil

func PasswdWithMask

func PasswdWithMask(hint string, defaultVal string, mask string) (string, error)

func RecoverError

func RecoverError(err interface{}) string

RecoverError is used to record the stack information of panic

func RenameDir

func RenameDir(oldDir, newDir string) error

func Ternary

func Ternary(a, b int64) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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