We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a7335f commit 7b19314Copy full SHA for 7b19314
pdata/pprofile/locations.go
@@ -28,8 +28,8 @@ var errTooManyLocationTableEntries = errors.New("too many entries in LocationTab
28
// PutLocation updates a LocationTable and a Profile's LocationIndices to
29
// add or update a location.
30
func PutLocation(table LocationSlice, record Profile, loc Location) error {
31
- for i := range record.LocationIndices().All() {
32
- idx := int(record.LocationIndices().At(i))
+ for i, locIdx := range record.LocationIndices().All() {
+ idx := int(locIdx)
33
if idx < 0 || idx >= table.Len() {
34
return fmt.Errorf("index value %d out of range in LocationIndices[%d]", idx, i)
35
}
0 commit comments