From: Daniel Martí Date: Thu, 7 Sep 2023 07:42:50 +0000 (+0100) Subject: fmt: adjust comment after CL 524940 X-Git-Tag: go1.22rc1~945 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2f0b28da1900909a2c3ddf646bb508fc7effb8f2;p=gostls13.git fmt: adjust comment after CL 524940 https://go.dev/cl/524940 swapped a call to Slice with Bytes, but the comment below still referenced Slice. Change-Id: Iedc772e1c49c4108bcd06f4cea0e637f011d053c Reviewed-on: https://go-review.googlesource.com/c/go/+/526356 Reviewed-by: Dmitri Shuralyov Reviewed-by: t hepudds LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- diff --git a/src/fmt/print.go b/src/fmt/print.go index 9c8e331118..cb393bd763 100644 --- a/src/fmt/print.go +++ b/src/fmt/print.go @@ -875,7 +875,7 @@ func (p *pp) printValue(value reflect.Value, verb rune, depth int) { if f.Kind() == reflect.Slice || f.CanAddr() { bytes = f.Bytes() } else { - // We have an array, but we cannot Slice() a non-addressable array, + // We have an array, but we cannot Bytes() a non-addressable array, // so we build a slice by hand. This is a rare case but it would be nice // if reflection could help a little more. bytes = make([]byte, f.Len())