From:
https://go-review.googlesource.com/c/go/+/352131/
Updates #47694
Change-Id: I7c7811c49900049f5ef7fc906fe25d2ffd73c7b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/368363
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
</p>
<p><!-- CL 352131 -->
- TODO: <a href="https://golang.org/cl/352131">https://golang.org/cl/352131</a>: add Value.{CanInt, CanUint, CanFloat, CanComplex}
+ A number of methods (
+ <a href="/pkg/reflect#Value.CanInt"><code>Value.CanInt</code></a>,
+ <a href="/pkg/reflect#Value.CanUint"><code>Value.CanUint</code></a>,
+ <a href="/pkg/reflect#Value.CanFloat"><code>Value.CanFloat</code></a>,
+ <a href="/pkg/reflect#Value.CanComplex"><code>Value.CanComplex</code></a>
+ )
+ have been added to
+ <a href="/pkg/reflect#Value"><code>Value</code></a>
+ to test if a conversion is safe.
</p>
<p><!-- CL 357962 -->