mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-08 16:12:16 -04:00
The `yolostring` routine was intended to avoid an allocation when converting from a `[]byte` to a `string` for map lookup. However, since 2014 Go has recognized this pattern and does not make a copy of the data when looking up a map. So the unsafe code is not necessary. In line with this, constants like `scrapeHealthMetricName` also become `[]byte`. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> |
||
|---|---|---|
| .. | ||
| testdata | ||
| helpers_test.go | ||
| manager.go | ||
| manager_test.go | ||
| scrape.go | ||
| scrape_test.go | ||
| target.go | ||
| target_test.go | ||