Skip to content

Commit 12dcf30

Browse files
authored
Merge pull request #13 from NetworksAreMadeOfString/master
Add support for OpenBSD
2 parents 37c8929 + 8795012 commit 12dcf30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pidusage.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ func init() {
5858
fnMap["darwin"] = wrapper("ps")
5959
fnMap["sunos"] = wrapper("ps")
6060
fnMap["freebsd"] = wrapper("ps")
61+
fnMap["openbsd"] = wrapper("proc")
6162
fnMap["aix"] = wrapper("ps")
6263
fnMap["linux"] = wrapper("proc")
6364
fnMap["netbsd"] = wrapper("proc")
6465
fnMap["win"] = wrapper("win")
6566

66-
if platform == "linux" || platform == "netbsd" {
67+
if platform == "linux" || platform == "netbsd" || platform == "openbsd" {
6768
initProc()
6869
}
6970
}

0 commit comments

Comments
 (0)