From faa1940a9c1ccba405704073d8991b39767456f8 Mon Sep 17 00:00:00 2001 From: steden <1470804@qq.com> Date: Wed, 22 Nov 2023 17:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 7 +++++-- system/resource.go | 8 ++++---- update.sh | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 38129fb13..f949ed3bd 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/farseer-go/fs go 1.19 require ( - github.com/shirou/gopsutil v2.21.11+incompatible + github.com/shirou/gopsutil/v3 v3.23.10 github.com/stretchr/testify v1.8.4 github.com/timandy/routine v1.1.2 gopkg.in/yaml.v3 v3.0.1 @@ -12,9 +12,12 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.13.0 // indirect ) diff --git a/system/resource.go b/system/resource.go index 4da023470..cfdf0700b 100644 --- a/system/resource.go +++ b/system/resource.go @@ -3,10 +3,10 @@ package system import ( "fmt" "github.com/farseer-go/fs/net" - "github.com/shirou/gopsutil/cpu" - "github.com/shirou/gopsutil/disk" - "github.com/shirou/gopsutil/host" - "github.com/shirou/gopsutil/mem" + "github.com/shirou/gopsutil/v3/cpu" + "github.com/shirou/gopsutil/v3/disk" + "github.com/shirou/gopsutil/v3/host" + "github.com/shirou/gopsutil/v3/mem" ) type resource struct { diff --git a/update.sh b/update.sh index 36b6b0431..3a58c9cc4 100644 --- a/update.sh +++ b/update.sh @@ -1,3 +1,4 @@ +go get github.com/shirou/gopsutil/v3 go get github.com/timandy/routine go get github.com/stretchr/testify go get gopkg.in/yaml.v3 \ No newline at end of file