]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: adjust comment after CL 524940
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 7 Sep 2023 07:42:50 +0000 (08:42 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 8 Sep 2023 06:28:03 +0000 (06:28 +0000)
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 <dmitshur@google.com>
Reviewed-by: t hepudds <thepudds1460@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/fmt/print.go

index 9c8e331118a5f27014a652e8d8b73f65e81d410d..cb393bd76370daa72b9af3bb8cdd2394787451bc 100644 (file)
@@ -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())