mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
6be622c380
commit
b26c88db2f
|
|
@ -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
|
zero-initialized with the constant <code>0</code> instead of the
|
||||||
constant <code>nil</code>. Go 1.10 provides <code>gofix</code>
|
constant <code>nil</code>. Go 1.10 provides <code>gofix</code>
|
||||||
modules to help with that rewrite:
|
modules to help with that rewrite:
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
go tool fix -r cftype <pkg>
|
go tool fix -r cftype <pkg>
|
||||||
go tool fix -r jni <pkg>
|
go tool fix -r jni <pkg>
|
||||||
</pre>
|
</pre>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For more details, see the <a href="/cmd/cgo/">cgo documentation</a>.
|
For more details, see the <a href="/cmd/cgo/">cgo documentation</a>.
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ import (
|
||||||
// calling kind-specific methods. Calling a method
|
// calling kind-specific methods. Calling a method
|
||||||
// inappropriate to the kind of type causes a run-time panic.
|
// inappropriate to the kind of type causes a run-time panic.
|
||||||
//
|
//
|
||||||
// Type values are comparable, such as with the == operator, and Type can be
|
// Type values are comparable, such as with the == operator,
|
||||||
// used as a map key type.
|
// so they can be used as map keys.
|
||||||
// Two Type values are equal if they represent identical types.
|
// Two Type values are equal if they represent identical types.
|
||||||
type Type interface {
|
type Type interface {
|
||||||
// Methods applicable to all types.
|
// Methods applicable to all types.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue