Documentation ¶
Index ¶
- func Exist(program string) (path string, err error)
- func FindLocation() (string, error)
- func IsFlagPassed(name string) bool
- func MatchFilter(filter []string, s string) bool
- func MatchString(pattern string, s string) bool
- func ShowArgs()
- func StringFindInSlice(slice []string, str string) int
- func StringToCmd(cmdString string) (cmd *exec.Cmd)
- func StringTrimSuffix(file string) string
- func WalkAll(path string, listPointer any, subFolder bool) error
- func WildcardToRegex(wildcard string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindLocation ¶
FindLocation 返回当前运行的可执行文件的地址 https://stackoverflow.com/questions/18537257/how-to-get-the-directory-of-the-currently-running-file
func MatchFilter ¶ added in v1.1.2
MatchFilter 过滤表匹配字符串
func MatchString ¶ added in v1.1.2
MatchString 字符串匹配字符串
func StringFindInSlice ¶ added in v1.1.2
StringFindInSlice find string's position in a slice
func StringToCmd ¶
StringToCmd 字符串按空格分词转换为 *exec.Cmd
func StringTrimSuffix ¶ added in v1.1.2
StringTrimSuffix remove suffix
func WalkAll ¶ added in v1.1.2
WalkAll 递归将指定路径下所有文件加入列表(链表或者切片) path为指定的文件路径字符串,listPointer为加入列表的指针,subFolder为是否要递归下级目录的布尔值
func WildcardToRegex ¶ added in v1.1.2
WildcardToRegex 通配符 * ? 转换为正则表达式
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.