mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
bec5abc4dc
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 |