We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
To Reproduce
import ( "github.com/shirou/gopsutil/host"
Expected behavior i want to get the mac os uptime using : cmd := exec.Command("sysctl", "-n", "kern.boottime")
Environment (please complete the following information): ProductName: macOS ProductVersion: 12.7.6 BuildVersion: 21H1320
Darwin nydeMacBook-Air.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Jun 24 00:56:10 PDT 2024; root:xnu-8020.240.18.709.2~1/RELEASE_X86_64 x86_64
Additional context
GO111MODULE='on' GOARCH='amd64' GOBIN='/usr/local/go/bin' GOCACHE='/Users/ny/Library/Caches/go-build' GOENV='/Users/ny/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/ny/workspace/projects/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/ny/workspace/projects/go' GOPRIVATE='' GOPROXY='https://goproxy.cn' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64' GOVCS='' GOVERSION='go1.23.2' GODEBUG='' GOTELEMETRY='local' GOTELEMETRYDIR='/Users/ny/Library/Application Support/go/telemetry' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='/Users/ny/workspace/projects/go/src/monk/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/kp/y_f5v_sd48q_8gb9r448__vr0000gn/T/go-build3486157989=/tmp/go-build -gno-record-gcc-switches -fno-common'
The text was updated successfully, but these errors were encountered:
kIOMasterPortDefault is not used anymore. Please specify latest v4 gopsutil version.
kIOMasterPortDefault
v4
Sorry, something went wrong.
ok , i will try it later, thanks
No branches or pull requests
Describe the bug
smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
To Reproduce
Expected behavior
i want to get the mac os uptime using :
cmd := exec.Command("sysctl", "-n", "kern.boottime")
Environment (please complete the following information):
ProductName: macOS
ProductVersion: 12.7.6
BuildVersion: 21H1320
Darwin nydeMacBook-Air.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Jun 24 00:56:10 PDT 2024; root:xnu-8020.240.18.709.2~1/RELEASE_X86_64 x86_64
Additional context
GO111MODULE='on'
GOARCH='amd64'
GOBIN='/usr/local/go/bin'
GOCACHE='/Users/ny/Library/Caches/go-build'
GOENV='/Users/ny/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/ny/workspace/projects/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/ny/workspace/projects/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/ny/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/ny/workspace/projects/go/src/monk/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/kp/y_f5v_sd48q_8gb9r448__vr0000gn/T/go-build3486157989=/tmp/go-build -gno-record-gcc-switches -fno-common'
The text was updated successfully, but these errors were encountered: