Browse Source

profile: avoid string(int) conversion (#513)

As per the vet check being introduced in 1.15
(https://github.com/golang/go/issues/32479), conversions of the form
string(int) are flagged by go vet. The suggested fix is to instead use
string(rune).

Additionally, since google/pprof is vendored into the go tree, we avoid
test failures from vet flagging this dependency (see
CL https://go-review.googlesource.com/c/go/+/220977).
Akhil Indurti 5 years ago
parent
commit
4ac0da889f
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      profile/proto.go

+ 1
- 1
profile/proto.go View File

235
 		b.u64 = uint64(le32(data[:4]))
235
 		b.u64 = uint64(le32(data[:4]))
236
 		data = data[4:]
236
 		data = data[4:]
237
 	default:
237
 	default:
238
-		return nil, errors.New("unknown wire type: " + string(b.typ))
238
+		return nil, errors.New("unknown wire type: " + string(rune(b.typ)))
239
 	}
239
 	}
240
 
240
 
241
 	return data, nil
241
 	return data, nil