From 2d388e291cca1cb72042bab38ec8402db508c33b Mon Sep 17 00:00:00 2001 From: Braydon Kains Date: Wed, 8 Nov 2023 15:48:26 -0600 Subject: [PATCH] hostmetricsreceiver: remove unused function `gopsutil` recently added the capability to pass environment vars through context. This is now done everywhere. This environment variable setting function is no longer used or necessary. This PR removes it. Signed-off-by: Braydon Kains --- receiver/hostmetricsreceiver/factory.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/receiver/hostmetricsreceiver/factory.go b/receiver/hostmetricsreceiver/factory.go index 5a22d2385144..e0df87763485 100644 --- a/receiver/hostmetricsreceiver/factory.go +++ b/receiver/hostmetricsreceiver/factory.go @@ -123,17 +123,12 @@ func createHostMetricsScraper(ctx context.Context, set receiver.CreateSettings, type environment interface { Lookup(k string) (string, bool) - Set(k, v string) error } type osEnv struct{} var _ environment = (*osEnv)(nil) -func (e *osEnv) Set(k, v string) error { - return os.Setenv(k, v) -} - func (e *osEnv) Lookup(k string) (string, bool) { return os.LookupEnv(k) }