diff --git a/cmd/playground/main.go b/cmd/playground/main.go index 55e1627..3fe3254 100644 --- a/cmd/playground/main.go +++ b/cmd/playground/main.go @@ -4,7 +4,7 @@ import ( "log" "os/exec" - "github.com/shirou/gopsutil/disk" + "github.com/shirou/gopsutil/v3/disk" ) func main() { diff --git a/go.mod b/go.mod index 7774dbe..95df34c 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,9 @@ go 1.13 require ( code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 - github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/blang/semver v3.5.1+incompatible github.com/fsnotify/fsnotify v1.4.9 github.com/gin-gonic/gin v1.6.3 - github.com/go-ole/go-ole v1.2.4 // indirect github.com/golang/protobuf v1.4.2 github.com/google/go-github v17.0.0+incompatible github.com/gorilla/websocket v1.4.2 @@ -18,12 +16,10 @@ require ( github.com/onsi/gomega v1.4.3 // indirect github.com/p14yground/go-github-selfupdate v0.0.0-20201212172144-81a03b17860d github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/shirou/gopsutil v3.20.11+incompatible + github.com/shirou/gopsutil/v3 v3.20.11 github.com/spf13/cobra v0.0.5 github.com/spf13/viper v1.7.1 - github.com/stretchr/testify v1.6.1 // indirect golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 - golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5 // indirect google.golang.org/grpc v1.33.1 google.golang.org/protobuf v1.25.0 gopkg.in/yaml.v2 v2.2.8 diff --git a/go.sum b/go.sum index 1d1c3a8..8b48b5e 100644 --- a/go.sum +++ b/go.sum @@ -302,8 +302,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto= -github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.20.11 h1:NeVf1K0cgxsWz+N3671ojRptdgzvp7BXL3KV21R0JnA= +github.com/shirou/gopsutil/v3 v3.20.11/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkUcCLlYhZzdr/4= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= diff --git a/service/monitor/monitor.go b/service/monitor/monitor.go index e48195c..87e9124 100644 --- a/service/monitor/monitor.go +++ b/service/monitor/monitor.go @@ -9,11 +9,11 @@ import ( "sync/atomic" "time" - "github.com/shirou/gopsutil/cpu" - "github.com/shirou/gopsutil/disk" - "github.com/shirou/gopsutil/host" - "github.com/shirou/gopsutil/mem" - "github.com/shirou/gopsutil/net" + "github.com/shirou/gopsutil/v3/cpu" + "github.com/shirou/gopsutil/v3/disk" + "github.com/shirou/gopsutil/v3/host" + "github.com/shirou/gopsutil/v3/mem" + "github.com/shirou/gopsutil/v3/net" "github.com/naiba/nezha/model" "github.com/naiba/nezha/service/dao"