aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/google/go-cmp/cmp/path.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-04 10:48:17 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-04 15:05:30 +0200
commit9573094ce235bd9afe88f5da27a47dd6bcc1e13b (patch)
treeff0e40aa5878957682a9dce7f073ead1a3f0b4a9 /vendor/github.com/google/go-cmp/cmp/path.go
parentdcff124efb2ea4a834b74ac0974aa2f2fd000b40 (diff)
go.mod: upgrade some dependencies
Since we started using modules, it's a good time to update some deps. Update to latest official versions packages that have newer versions. Update #1247
Diffstat (limited to 'vendor/github.com/google/go-cmp/cmp/path.go')
-rw-r--r--vendor/github.com/google/go-cmp/cmp/path.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go
index 509d6b852..603dbb002 100644
--- a/vendor/github.com/google/go-cmp/cmp/path.go
+++ b/vendor/github.com/google/go-cmp/cmp/path.go
@@ -177,7 +177,8 @@ type structField struct {
// pvx, pvy, and field are only valid if unexported is true.
unexported bool
mayForce bool // Forcibly allow visibility
- pvx, pvy reflect.Value // Parent values
+ paddr bool // Was parent addressable?
+ pvx, pvy reflect.Value // Parent values (always addressible)
field reflect.StructField // Field information
}
@@ -189,8 +190,8 @@ func (sf StructField) Values() (vx, vy reflect.Value) {
// Forcibly obtain read-write access to an unexported struct field.
if sf.mayForce {
- vx = retrieveUnexportedField(sf.pvx, sf.field)
- vy = retrieveUnexportedField(sf.pvy, sf.field)
+ vx = retrieveUnexportedField(sf.pvx, sf.field, sf.paddr)
+ vy = retrieveUnexportedField(sf.pvy, sf.field, sf.paddr)
return vx, vy // CanInterface reports true
}
return sf.vx, sf.vy // CanInterface reports false