util

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootPath    = CmdPath()
	ProcessPath = ExecutePath()
)
View Source
var (
	CreateCommand func(command string) *exec.Cmd
)
View Source
var (
	MessageList []ErrorMessage
)

Functions

func CmdPath

func CmdPath() string

func EmitError

func EmitError(n int, msg string)

func ErrorHandler

func ErrorHandler(err ErrorMessage)

func ExecuteCommand added in v0.1.4

func ExecuteCommand(command string) int

func ExecuteCommandResult added in v0.1.4

func ExecuteCommandResult(command string) string

func ExecuteCommandSilent added in v0.1.4

func ExecuteCommandSilent(command string) int

func ExecuteCommandSilentResult added in v0.1.4

func ExecuteCommandSilentResult(command string) string

func ExecutePath

func ExecutePath() string

func FileLogger

func FileLogger(src string)

func Map

func Map[T any](array []T, callback func(T) T) []T

func NewDebounce

func NewDebounce(interval time.Duration) func(f func())

func NewThrottle

func NewThrottle(interval time.Duration) func(f func())

func Recover

func Recover(errorHandler func(ErrorMessage))

func SetAppend

func SetAppend(set map[string]struct{}, files []string)

Types

type ErrorMessage

type ErrorMessage struct {
	Type int
	Msg  string
}

Jump to

Keyboard shortcuts

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