Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use of reflect.StringHeader in prometheus/metric.go
The `go vet` command in Go 1.16 reports a warning for inappropriate use of reflect.StringHeader. golang/go#40701 Its use in prometheus/metric.go to convert a byte array to a string in place began to trigger the warning. That code has been replaced with a safer variant that avoids the `vet` warning and still converts the array without allocating new memory. https://stackoverflow.com/a/66865482
- Loading branch information