utils

package
v0.0.0-...-046d61f Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_TPL_LAYOUT = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source, dest string)

CopyFile copy文件

func GetConf

func GetConf(module, key string) interface{}

func Loading

func Loading(fn func(interface{}), arg interface{})

Loading async show load progress TODO: go fn ISSUE: *File.Sync()

func PathExists

func PathExists(path string) (bool, error)

Exists 路径是否存在

func ReadLine

func ReadLine(s string, handler func(string)) error

ReadLine 按行对字符串进行处理

func ReadStdin

func ReadStdin(prompt string, handler func(string) bool) (input string)

ReadStdin 给与提示 + 接收stdin + 执行注册的匿名函数

func RunCmd

func RunCmd(cmd *exec.Cmd)

RunCmd 执行命令

func Value

func Value(s, k string) string

Value 从一段带有冒号(:)的字符串中 解析出值

Types

This section is empty.

Jump to

Keyboard shortcuts

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