Can anyone recommend a module which can be used to get system information, like Python's psutil
?
When I tried >go get github.com/golang/sys get 'sys'
, I received the following:
Report Error:
package github.com/golang/sys
imports github.com/golang/sys
imports github.com/golang/sys: no buildable Go source files in D:\go_source\src\github.com\golang\sys
This my system environment:
# native compiler windows amd64
GOROOT=D:\Go
#GOBIN=
GOARCH=amd64
GOOS=windows
CGO_ENABLED=1
PATH=c:\mingw64\bin;%GOROOT%\bin;%PATH%
LITEIDE_GDB=gdb64
LITEIDE_MAKE=mingw32-make
LITEIDE_TERM=%COMSPEC%
LITEIDE_TERMARGS=
LITEIDE_EXEC=%COMSPEC%
LITEIDE_EXECOPT=/C
You would need actually to do (following godoc):
go get golang.org/x/sys/unix
# or
go get golang.org/x/sys/windows
# or
go get golang.org/x/sys/plan9
(depending on your OS)
I know this is an old post, but putting this out there for others who can benefit.
exactly what you're looking for here: