From ee16c8d663a77cc9f92a06658fa70d981712982a Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:21:40 +0200 Subject: [PATCH] refactor: drop old gopsutil dependency (#158) ## What does this PR do? We're using two different versions of the gopsutil library. Drop the old version and only use the modern module-aware dependency ## Why is it important? ## Checklist - [ ] My code follows the style guidelines of this project - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added an entry in `CHANGELOG.md` ## Author's Checklist - [ ] ## Related issues - --- go.mod | 1 - go.sum | 2 -- metric/system/process/process.go | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/go.mod b/go.mod index e136d59ebd..e3f679d785 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/gofrs/uuid v4.4.0+incompatible github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 github.com/magefile/mage v1.15.0 - github.com/shirou/gopsutil v3.21.11+incompatible github.com/shirou/gopsutil/v3 v3.21.12 github.com/stretchr/testify v1.9.0 go.elastic.co/go-licence-detector v0.5.0 diff --git a/go.sum b/go.sum index d7e0f2c3c0..b30fe7707e 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,6 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= -github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= diff --git a/metric/system/process/process.go b/metric/system/process/process.go index b74356a920..4a9151b61e 100644 --- a/metric/system/process/process.go +++ b/metric/system/process/process.go @@ -27,7 +27,7 @@ import ( "strings" "time" - psutil "github.com/shirou/gopsutil/process" + psutil "github.com/shirou/gopsutil/v3/process" "github.com/elastic/elastic-agent-libs/mapstr" "github.com/elastic/elastic-agent-libs/opt"