Commit Graph

12 Commits (bc060cc22738577827df3308c7ef4cfc666ef152)

Author SHA1 Message Date
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
Dylan Myers 9bf502f825 Fix logic errors, syntax errors, and typos
Justin Yang 4a46201e00 cpu && host: fix compile time errors
mmorel-35 1e6b445a8a gofumpt
shirou 0969c9436b delete v2 directory, move v3 to top #1078
Sergey Vinogradov 5209442b3c Refactor "host" package
shirou b99342a9ce [host] fallback: implement PlatformInformation()
shirou 4c73494c78 Add WithContext functions.
WAKAYAMA Shirou 114c78c777 [host]: add not implemented methods.
James Nugent 408005be94 host: Add Solaris support for Info, {Boot,Up}time
This commit adds support for Info(), BootTime() and Uptime() in package
Host. It uses no cgo, preferring to parse the output of `kstat -p`
instead.

Thanks go to @gfrey for the parsing logic for `/etc/release` and `uname`.
Marco Pfatschbacher b4846b445b Add support for OpenBSD/amd64
This code is based on the FreeBSD version
and implements roughly the same feature set.
Lukas Fittl da9fa1162b Add fallback code for all unsupported operating systems.
This enables using gopsutil in a codebase that gets built on other OSes
than the ones supported. Instead of a build failure as before, due to
the build tags, gopsutil will now throw an "not implemented" runtime
error.

Fixes #234.