Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NumCPU ¶
func NumCPU() int
NumCPU 返回当前进程可用的逻辑cpu数量
通过查询操作系统来检查可用的cpu集,调用了go lib中runtime.NumCPU函数
func PathRunDir ¶
func PathRunDir() string
PathRunDir 返回当前程序运行目录的绝对路径
默认kercylan-lib库的kruntime包在被调用之处便通过初始化获取了当前应用程序运行的根目录绝对路径 由于os.Args[0]获取的是应用程序的运行路径,那么通过filepath.Dir获取到应用程序的运行目录后通过filepath.Abs将其转换确保其为一个绝对路径
func PathRunExe ¶
func PathRunExe() string
PathRunExe 返回当前运行的应用程序的绝对路径
os.Args[0]得到的值直接表示了应用程序的运行路径,并且这是一个绝对路径 等同于os.Args[0]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.