1
0
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:
dudaodong
2024-09-13 16:10:09 +08:00
parent e58c9b797b
commit 2bbcb85286
5 changed files with 261 additions and 1 deletions

View File

@@ -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)
}