diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-02-24 18:35:17 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-02-26 04:38:19 +0000 |
commit | 6052838bc325049505aba9c3b87256161f9e05e8 (patch) | |
tree | 5d566da7ff0796abd2eb08c168ac2547948fac67 /src/runtime/pprof | |
parent | c46ffdd2eca339918ed30b6ba9d4715ba769d35d (diff) | |
download | go-6052838bc325049505aba9c3b87256161f9e05e8.tar.gz go-6052838bc325049505aba9c3b87256161f9e05e8.zip |
all: avoid string(i) where i has type int
Instead use string(r) where r has type rune.
This is in preparation for a vet warning for string(i).
Updates #32479
Change-Id: Ic205269bba1bd41723950219ecfb67ce17a7aa79
Reviewed-on: https://go-review.googlesource.com/c/go/+/220844
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Akhil Indurti <aindurti@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Toshihiro Shiino <shiino.toshihiro@gmail.com>
Diffstat (limited to 'src/runtime/pprof')
-rw-r--r-- | src/runtime/pprof/internal/profile/proto.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/pprof/internal/profile/proto.go b/src/runtime/pprof/internal/profile/proto.go index 11d7f9ff9b..294acfeb92 100644 --- a/src/runtime/pprof/internal/profile/proto.go +++ b/src/runtime/pprof/internal/profile/proto.go @@ -232,7 +232,7 @@ func decodeField(b *buffer, data []byte) ([]byte, error) { b.u64 = uint64(le32(data[:4])) data = data[4:] default: - return nil, errors.New("unknown type: " + string(b.typ)) + return nil, errors.New("unknown type: " + string(rune(b.typ))) } return data, nil |