Replace github.com/shirou/gopsutil/v3 with v4 (#3956)

* Replace `github.com/shirou/gopsutil/v3` to v4

PR #3925 only added the new v4 dependency into our `go.mod` file. The
actual usages in the source code were not updated to use the new v4
version.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* Tidy `go.mod` correctly

One `require` section for direct dependencies; Another `require` section
for indirect dependencies.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun
2024-10-12 03:13:33 +08:00
committed by GitHub
parent deb938d521
commit 08bda166fe
3 changed files with 43 additions and 59 deletions

View File

@@ -3,9 +3,9 @@ package metrics
import (
"time"
"github.com/shirou/gopsutil/v3/cpu"
"github.com/shirou/gopsutil/v3/disk"
"github.com/shirou/gopsutil/v3/mem"
"github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/disk"
"github.com/shirou/gopsutil/v4/mem"
log "github.com/sirupsen/logrus"
)