libutils

package module
v0.0.0-...-1c3708c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: GPL-3.0 Imports: 14 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Lock        = sync.RWMutex{}
	Stdin       = bufio.NewReader(os.Stdin)
	PathFile, _ = os.Executable()
)

Functions

func Atoi

func Atoi(s string) int

func BytesToSize

func BytesToSize(value float64) string

func ClearScreen

func ClearScreen()

func CopyFile

func CopyFile(source string, destination string)

func CreateFile

func CreateFile(name string, s string) error

func GetConfigPath

func GetConfigPath(name string, filename string) string

func Input

func Input(s string) string

func IsCommandExists

func IsCommandExists(file string) bool

func JsonReadWrite

func JsonReadWrite(filename string, v interface{}, vd interface{})

func JsonWrite

func JsonWrite(v interface{}, filename string)

func KillProcess

func KillProcess(p *os.Process)

func MakeDir

func MakeDir(fullpath string)

func PaddingLeft

func PaddingLeft(value string, s string, count int) string

func PaddingRight

func PaddingRight(value string, s string, count int) string

func RealPath

func RealPath(name string) string

Types

type InterruptHandler

type InterruptHandler struct {
	Done   chan bool
	Handle func()
}

func (*InterruptHandler) Start

func (i *InterruptHandler) Start()

func (*InterruptHandler) Wait

func (i *InterruptHandler) Wait()

Jump to

Keyboard shortcuts

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