From b26c88db2f338d6529e1021db59f0faa75af5934 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 9 Jan 2018 15:52:01 -0500 Subject: [PATCH] reflect: fix doc nit Type values being comparable implies that Type is a valid map key type. As previously written, they sound unrelated. Change-Id: I8e2235275d62898bfb47de850e8257b51ab5cbd6 Reviewed-on: https://go-review.googlesource.com/87021 Run-TryBot: Russ Cox Reviewed-by: Ian Lance Taylor --- doc/go1.10.html | 3 ++- src/reflect/type.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/go1.10.html b/doc/go1.10.html index 6c0ce989d2..05e7ee2670 100644 --- a/doc/go1.10.html +++ b/doc/go1.10.html @@ -295,11 +295,12 @@ Because of this change, values of the affected types need to be zero-initialized with the constant 0 instead of the constant nil. Go 1.10 provides gofix modules to help with that rewrite: +

+
 go tool fix -r cftype <pkg>
 go tool fix -r jni <pkg>
 
-

For more details, see the cgo documentation. diff --git a/src/reflect/type.go b/src/reflect/type.go index 9c967de45c..171fc07bfe 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -32,8 +32,8 @@ import ( // calling kind-specific methods. Calling a method // inappropriate to the kind of type causes a run-time panic. // -// Type values are comparable, such as with the == operator, and Type can be -// used as a map key type. +// Type values are comparable, such as with the == operator, +// so they can be used as map keys. // Two Type values are equal if they represent identical types. type Type interface { // Methods applicable to all types. -- 2.48.1