Skip to content

Commit 5af95e8

Browse files
braydonkjmsnll
authored andcommitted
hostmetricsreceiver: remove unused function (open-telemetry#29075)
**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:** open-telemetry#23055 Signed-off-by: Braydon Kains <[email protected]>
1 parent 315b146 commit 5af95e8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

receiver/hostmetricsreceiver/factory.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,12 @@ func createHostMetricsScraper(ctx context.Context, set receiver.CreateSettings,
123123

124124
type environment interface {
125125
Lookup(k string) (string, bool)
126-
Set(k, v string) error
127126
}
128127

129128
type osEnv struct{}
130129

131130
var _ environment = (*osEnv)(nil)
132131

133-
func (e *osEnv) Set(k, v string) error {
134-
return os.Setenv(k, v)
135-
}
136-
137132
func (e *osEnv) Lookup(k string) (string, bool) {
138133
return os.LookupEnv(k)
139134
}

0 commit comments

Comments
 (0)