Skip to content

Commit

Permalink
hostmetricsreceiver: remove unused function (#29075)
Browse files Browse the repository at this point in the history
**Description:**
`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.

**Link to tracking Issue:** #23055

Signed-off-by: Braydon Kains <[email protected]>
  • Loading branch information
braydonk authored Nov 8, 2023
1 parent b595986 commit 65b745f
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 65b745f

Please sign in to comment.