From 2f0b28da1900909a2c3ddf646bb508fc7effb8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 7 Sep 2023 08:42:50 +0100 Subject: [PATCH] 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 --- src/fmt/print.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fmt/print.go b/src/fmt/print.go index 9c8e331118a..cb393bd7637 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())