aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-01-09 15:52:01 -0500
committerRuss Cox <rsc@golang.org>2018-01-09 21:48:16 +0000
commitb26c88db2f338d6529e1021db59f0faa75af5934 (patch)
tree21d8c9bc963e9041e83862817e88f6cb219ae3b7
parent6be622c38067a70b31a65e677944b8bb264cca06 (diff)
downloadgo-b26c88db2f338d6529e1021db59f0faa75af5934.tar.gz
go-b26c88db2f338d6529e1021db59f0faa75af5934.zip
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 <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--doc/go1.10.html3
-rw-r--r--src/reflect/type.go4
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 <code>0</code> instead of the
constant <code>nil</code>. Go 1.10 provides <code>gofix</code>
modules to help with that rewrite:
+</p>
+
<pre>
go tool fix -r cftype &lt;pkg&gt;
go tool fix -r jni &lt;pkg&gt;
</pre>
-</p>
<p>
For more details, see the <a href="/cmd/cgo/">cgo documentation</a>.
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.