From 36b185e408a56d93678f52a59e1d68ece8bf0508 Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Thu, 30 Aug 2018 03:54:08 -0700 Subject: Use proto.Equal instead of reflect.DeepEquals --- actions/policy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions') diff --git a/actions/policy.go b/actions/policy.go index cbdcb3a..39c235d 100644 --- a/actions/policy.go +++ b/actions/policy.go @@ -22,8 +22,8 @@ package actions import ( "fmt" "log" - "reflect" + "github.com/golang/protobuf/proto" "github.com/pkg/errors" "github.com/google/fscrypt/crypto" @@ -153,7 +153,7 @@ func GetPolicyFromPath(ctx *Context, path string) (*Policy, error) { } log.Printf("found data for policy %s on %q", descriptor, ctx.Mount.Path) - if !reflect.DeepEqual(pathData.Options, mountData.Options) { + if !proto.Equal(pathData.Options, mountData.Options) { log.Printf("options from path: %+v", pathData.Options) log.Printf("options from mount: %+v", mountData.Options) return nil, errors.Wrapf(ErrPolicyMetadataMismatch, "policy %s", descriptor) -- cgit v1.2.3