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: 12 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址