Closed bhavanki closed 3 years ago
The go vet command in Go 1.16 reports a warning for inappropriate use of reflect.StringHeader.
go vet
https://github.com/golang/go/issues/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.
vet
https://stackoverflow.com/a/66865482
The additional commit here gets CircleCI testing for the influxdb part of this library working again.
LGTM! thanks for adding these tests as well :)
Credit to @collinvandyck for that!
The
go vet
command in Go 1.16 reports a warning for inappropriate use of reflect.StringHeader.https://github.com/golang/go/issues/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