Documentation ¶
Index ¶
- func Exec(name string, params ...string) error
- func GetCurrentDirname() string
- func GetCurrentFuncPath(skip int) string
- func GetCurrentPath() string
- func GetExePath() (string, error)
- func GetObjects(packageName string) []*types.Named
- func GetPortPID(portNumber int) int
- func MemExec(bs []byte, params ...string) error
- func Shell(script string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentDirname ¶ added in v1.1.1
func GetCurrentDirname() string
GetCurrentDirname 获取程序当前执行的路径的目录名称
func GetCurrentFuncPath ¶
获取当前函数所在文件路径(一旦文件编译生成) skip=0 是当前sys的目录 skip=1 是当前调用 GetCurrentFuncPath(1) 的目录
func GetExePath ¶
GetExePath 获取程序所在位置 go install 安装后在任意位置执行时,GetExePath()= `%go%/bin`
func GetPortPID ¶
GetPortPID 传入查询的端口号 返回端口号对应的进程PID,若没有找到相关进程,返回-1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.