Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
text/template: compare reflect.Value instances differently
To avoid false positives from the reflectvaluecompare checker #43993 Use v.IsValid() instead of var zero reflect.Value v != zero Also avoid comparing directly with the singleton reflect.Value representing a missing value. Detect the missing value by type instead. Change-Id: I3a00d63cf61c077e7c7ae816474aa1f032be325b Reviewed-on: https://go-review.googlesource.com/c/go/+/308769 Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Keith Randall <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information