util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootPath    = CmdPath()
	ProcessPath = ExecutePath()
)
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 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