sys

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAbsolutePath

func GetAbsolutePath() string

GetAbsolutePath 获取当前程序执行的路径 => 当前命令行执行的位置

func GetCurrentFuncPath

func GetCurrentFuncPath(skip int) string

获取当前函数所在文件路径(一旦文件编译生成) skip=0 是当前sys的目录 skip=1 是当前调用 GetCurrentFuncPath(1) 的目录

func GetCurrentPath

func GetCurrentPath() (string, error)

GetCurrentPath 获取当前程序所在位置 go install 安装后在任意位置执行时,GetCurrentPath()= `%go%/bin`

func GetPortPID

func GetPortPID(portNumber int) int

GetPortPID 传入查询的端口号 返回端口号对应的进程PID,若没有找到相关进程,返回-1

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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