deprecated

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(program string) (path string, err error)

Exist 检查指定程序是否存在于环境变量或者可执行文件的同一目录中

func FindLocation

func FindLocation() (string, error)

FindLocation 返回当前运行的可执行文件的地址 https://stackoverflow.com/questions/18537257/how-to-get-the-directory-of-the-currently-running-file

func IsFlagPassed

func IsFlagPassed(name string) bool

IsFlagPassed 判断flag是否被传入

func MatchFilter added in v1.1.2

func MatchFilter(filter []string, s string) bool

MatchFilter 过滤表匹配字符串

func MatchString added in v1.1.2

func MatchString(pattern string, s string) bool

MatchString 字符串匹配字符串

func ShowArgs

func ShowArgs()

ShowArgs 显示所有的命令行传入参数

func StringFindInSlice added in v1.1.2

func StringFindInSlice(slice []string, str string) int

StringFindInSlice find string's position in a slice

func StringToCmd

func StringToCmd(cmdString string) (cmd *exec.Cmd)

StringToCmd 字符串按空格分词转换为 *exec.Cmd

func StringTrimSuffix added in v1.1.2

func StringTrimSuffix(file string) string

StringTrimSuffix remove suffix

func WalkAll added in v1.1.2

func WalkAll(path string, listPointer any, subFolder bool) error

WalkAll 递归将指定路径下所有文件加入列表(链表或者切片) path为指定的文件路径字符串,listPointer为加入列表的指针,subFolder为是否要递归下级目录的布尔值

func WildcardToRegex added in v1.1.2

func WildcardToRegex(wildcard string) string

WildcardToRegex 通配符 * ? 转换为正则表达式

Types

This section is empty.

Jump to

Keyboard shortcuts

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