mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 15:12:26 +08:00
feat: add GetProcessInfo for system package
This commit is contained in:
@@ -117,3 +117,17 @@ func ExampleKillProcess() {
|
||||
// Output:
|
||||
// <nil>
|
||||
}
|
||||
|
||||
func ExampleGetProcessInfo() {
|
||||
pid, err := StartProcess("ls", "-a")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
processInfo, err := GetProcessInfo(pid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(processInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user