Commit a1c9e103 authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

reflect: document that Values can't be compared directly

Fixes #9504.

Change-Id: I148f407ace3d1b4db3f19fbb8561d1ee6c4c13b3
Reviewed-on: https://go-review.googlesource.com/2273Reviewed-by: default avatarRob Pike <r@golang.org>
parent a1053ed6
......@@ -30,6 +30,10 @@ const cannotSet = "cannot set value obtained from unexported struct field"
// A Value can be used concurrently by multiple goroutines provided that
// 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.
type Value struct {
// typ holds the type of the value represented by a Value.
typ *rtype
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment