14 lines
245 B
Go
14 lines
245 B
Go
|
package system
|
||
|
|
||
|
import "github.com/shirou/gopsutil/process"
|
||
|
|
||
|
func GetAllProcessPid() []int32 {
|
||
|
pidList, _ := process.Pids()
|
||
|
return pidList
|
||
|
}
|
||
|
|
||
|
func GetProcessInfo(pid int32) *process.Process {
|
||
|
info, _ := process.NewProcess(pid)
|
||
|
return info
|
||
|
}
|