Documentation ¶
Index ¶
- func CopyFile(destPath, sourcePath string) error
- func FileSha256Hex(name string) (string, error)
- func FindFile(name string) error
- func IntMin(a, b int) int
- func Panic(err error)
- func PathIsExist(name string) (bool, error)
- func PathIsNotExist(name string) (ok bool, err error)
- func Sha256Hex(data []byte) string
- func StrIndex(slice []string, item string) int
- func StrSliceFilter(arr []string, test func(string) bool) (result []string)
- func WrapErrors(allErrors ...error) (wrapped error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶ added in v0.2.0
https://stackoverflow.com/questions/30376921/how-do-you-copy-a-file-in-go
func FileSha256Hex ¶ added in v0.2.0
FileSha256Hex 返回文件 name 的 hex 字符串。 虽然函数名是 Sha256, 但实际上采用 BLAKE2b 算法。
func PathIsExist ¶
PathIsExist 找到名为 name 的文件时返回 true, 否则返回 false
func PathIsNotExist ¶
PathIsNotExist 找不到名为 name 的文件时返回 true, 否则返回 false
func StrIndex ¶ added in v0.2.0
StrIndex returns the index of a string in the slice. returns -1 if not found.
func StrSliceFilter ¶ added in v0.2.0
func WrapErrors ¶ added in v0.2.0
WrapErrors 把多个错误合并为一个错误.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.