Skip to content

Commit

Permalink
hostmetricsreceiver: remove unused function
Browse files Browse the repository at this point in the history
`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 <braydonk@google.com>
  • Loading branch information
braydonk committed Nov 8, 2023
1 parent eb320a1 commit 2d388e2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions receiver/hostmetricsreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 2d388e2

Please sign in to comment.