diff options
| author | Joe Tsai <joetsai@digital-static.net> | 2017-01-31 12:54:45 -0800 |
|---|---|---|
| committer | Joe Tsai <thebrokentoaster@gmail.com> | 2017-02-01 19:11:34 +0000 |
| commit | 048b8cecc6e74b50205e803ca387ffaa7e9f37fe (patch) | |
| tree | a6b811c4656b43ae54e83d630bff2c24d312a3fb /src | |
| parent | 47ce87877b1e2d4f34bb93fe6c7d88785b318cd5 (diff) | |
| download | go-048b8cecc6e74b50205e803ca387ffaa7e9f37fe.tar.xz | |
reflect: adjust documentation on Value
Make the documentation more explicit that it is not safe to directly
compare Value. Get straight to the point on how to do it correctly.
Updates #18871
Change-Id: I2aa3253f779636b2f72a1aae8c9bb45d3c32c902
Reviewed-on: https://go-review.googlesource.com/36018
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/reflect/value.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go index 1abfbe6f65..abd8489fb8 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -30,9 +30,9 @@ const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ide // the underlying Go value can be used concurrently for the equivalent // direct operations. // -// Using == on two Values does not compare the underlying values -// they represent, but rather the contents of the Value structs. // To compare two Values, compare the results of the Interface method. +// Using == on two Values does not compare the underlying values +// they represent. type Value struct { // typ holds the type of the value represented by a Value. typ *rtype |
