prometheus/scrape
Bryan Boreham bec5abc4dc scrape: remove unsafe code
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>
2022-12-20 17:26:43 +00:00
..
testdata Re-generate test cert to fix test_windows test failures 2022-03-17 19:37:18 +01:00
helpers_test.go Merge branch 'main' into sparsehistogram 2022-08-10 17:54:37 +02:00
manager.go Enable protobuf negotiation only when histograms are enabled 2022-10-12 13:27:22 +05:30
manager_test.go Update package scrape tests for new labels.Labels type 2022-12-19 15:22:09 +00:00
scrape.go scrape: remove unsafe code 2022-12-20 17:26:43 +00:00
scrape_test.go scrape: remove unsafe code 2022-12-20 17:26:43 +00:00
target.go Update package scrape for new labels.Labels type 2022-12-19 15:22:09 +00:00
target_test.go Update package scrape tests for new labels.Labels type 2022-12-19 15:22:09 +00:00