diff options
author | Joe Tsai <joetsai@digital-static.net> | 2019-02-16 21:14:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 21:14:50 -0800 |
commit | 19e9c26bf5e5441c59d5d57be74c380f28757cdd (patch) | |
tree | 431c2922ccdcf2d69012f394e454d59f2fdb7ef6 /cmp/compare_test.go | |
parent | ba10d0b4aceae4ab62c99f38b61d600756d7533b (diff) | |
download | go-cmp-19e9c26bf5e5441c59d5d57be74c380f28757cdd.tar.gz |
Always ignore _ fields (#108)
The _ field in Go is special in that it cannot be read from or written to.
Thus, skip it by default. It is pointless to require the user to use
cmpopts.IgnoreUnexported just for the _ field.
Diffstat (limited to 'cmp/compare_test.go')
-rw-r--r-- | cmp/compare_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmp/compare_test.go b/cmp/compare_test.go index e5d4450..a776284 100644 --- a/cmp/compare_test.go +++ b/cmp/compare_test.go @@ -465,6 +465,10 @@ root[0]["hr"]: root[1]["hr"]: -: int(63) +: float64(63)`, + }, { + label: label, + x: struct{ _ string }{}, + y: struct{ _ string }{}, }} } |