File tree 1 file changed +2
-3
lines changed
cmd/otel-allocator/target
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -252,11 +252,10 @@ func (m *Discoverer) Close() {
252
252
// Calculate a hash for a scrape config map.
253
253
// This is done by marshaling to YAML because it's the most straightforward and doesn't run into problems with unexported fields.
254
254
func getScrapeConfigHash (jobToScrapeConfig map [string ]* promconfig.ScrapeConfig ) (hash.Hash64 , error ) {
255
- var err error
256
255
hash := fnv .New64 ()
257
256
yamlEncoder := yaml .NewEncoder (hash )
258
257
for jobName , scrapeConfig := range jobToScrapeConfig {
259
- _ , err = hash .Write ([]byte (jobName ))
258
+ _ , err : = hash .Write ([]byte (jobName ))
260
259
if err != nil {
261
260
return nil , err
262
261
}
@@ -266,5 +265,5 @@ func getScrapeConfigHash(jobToScrapeConfig map[string]*promconfig.ScrapeConfig)
266
265
}
267
266
}
268
267
yamlEncoder .Close ()
269
- return hash , err
268
+ return hash , nil
270
269
}
You can’t perform that action at this time.
0 commit comments