Documentation ¶
Index ¶
- Variables
- func AbsPath(file_ string) string
- func CopyFile(src string, dst string)
- func CreatFile(src string, data string)
- func DeleteFile(src string)
- func EmitError(n int, msg string)
- func ErrorHandler(err ErrorMessage)
- func ExecuteCommand(command string) int
- func ExecuteCommandResult(command string) string
- func ExecuteCommandSilent(command string) int
- func ExecuteCommandSilentResult(command string) string
- func FileLogger(src string)
- func Filter[T any](array []T, callback func(T) bool) []T
- func KillByName(name string)
- func Map[T any](array []T, callback func(T) T) []T
- func NewDebounce(interval time.Duration) func(f func())
- func NewThrottle(interval time.Duration) func(f func())
- func ReadAll(src string) string
- func Recover(errorHandler func(ErrorMessage))
- func Reduce[T any, U any](array []T, callback func(U, T) U, init U) U
- func TimerStart() *timer
- func Timestamp() string
- func UnixTime() int64
- func WslPathConvent(path string) string
- type ErrorMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WorkingDirectory = workingDirectory() ExecuteDirectory = executorDirectory() TempDirectory = os.TempDir() StringBuilder = strings.Builder{} )
View Source
var (
CreateCommand func(command string) *exec.Cmd
)
View Source
var (
MessageList []ErrorMessage
)
Functions ¶
func DeleteFile ¶
func DeleteFile(src string)
func ErrorHandler ¶ added in v0.0.3
func ErrorHandler(err ErrorMessage)
func ExecuteCommand ¶ added in v0.0.3
func ExecuteCommandResult ¶ added in v0.0.3
func ExecuteCommandSilent ¶ added in v0.0.3
func ExecuteCommandSilentResult ¶ added in v0.0.3
func FileLogger ¶
func FileLogger(src string)
func KillByName ¶ added in v0.0.3
func KillByName(name string)
func NewDebounce ¶ added in v0.0.3
func NewThrottle ¶ added in v0.0.3
func Recover ¶ added in v0.0.3
func Recover(errorHandler func(ErrorMessage))
func TimerStart ¶ added in v0.0.3
func TimerStart() *timer
func WslPathConvent ¶ added in v0.0.3
cover windows path to wsl path D:\soft\code --> /mnt/d/soft/code
Types ¶
type ErrorMessage ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.