utils

package module
v0.0.0-...-5ae08e3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootSleep

func BootSleep()

func Bytes2Lines

func Bytes2Lines(data []byte) []string

func CheckNumberPowerOfTwo

func CheckNumberPowerOfTwo(n int) int

func DebugSleepM

func DebugSleepM(microsec int)

func DebugSleepS

func DebugSleepS(sec int)

func DirExists

func DirExists(dir string) bool

func DotStuffingByte

func DotStuffingByte(input []byte) []byte

Function to escape dot-stuffing in a []byte

func Fallocate

func Fallocate(file *os.File, offset int64, length int64) error

linux syscall for Fallocate

func FileExists

func FileExists(File_path string) bool

func GetSoftLinkTarget

func GetSoftLinkTarget(link string) string
func HardLink(src string, dst string) bool

func Hash256

func Hash256(astr string) string

func IsDigit

func IsDigit(s string) bool

func IsSpace

func IsSpace(b byte) bool

func Line_isPrintable

func Line_isPrintable(line string) bool

func Lines2Bytes

func Lines2Bytes(lines []string) []byte

func MMAP_CLOSE

func MMAP_CLOSE(file_path string, file_handle *os.File, mmap_handle mmap.MMap, mode string) (bool, error)

func MMAP_FILE

func MMAP_FILE(file_path string, mode string) (*os.File, mmap.MMap, error)

func Mkdir

func Mkdir(dir string) bool

func Nano

func Nano() int64

func Now

func Now() int64

func RandomCharsHex

func RandomCharsHex(size int) string

func SleepM

func SleepM(microsec int)

func SleepMS

func SleepMS(millisec int)

func SleepS

func SleepS(sec int)
func SoftLink(src string, dst string) bool

func Str2int

func Str2int(str string) int

func Str2int64

func Str2int64(str string) int64

func Str2uint64

func Str2uint64(str string) uint64

func UndoDotStuffingByte

func UndoDotStuffingByte(input []byte) []byte

Function to undo dot-stuffing in a []byte

func UndoDotStuffingLines

func UndoDotStuffingLines(lines *[]string) *[]string

func UnixTimeMicroSec

func UnixTimeMicroSec() int64

func UnixTimeMilliSec

func UnixTimeMilliSec() int64

func UnixTimeNanoSec

func UnixTimeNanoSec() int64

func UnixTimeSec

func UnixTimeSec() int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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