Merge pull request #2518 from katarzyna-z/kk-remove-go-cmp

Remove go-cmp from from cache comparison
This commit is contained in:
David Ashpole 2020-04-29 11:51:58 -07:00 committed by GitHub
commit 1cbd3c7c58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

2
go.mod
View File

@ -24,7 +24,7 @@ require (
github.com/go-ini/ini v1.9.0 // indirect
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e // indirect
github.com/gogo/protobuf v1.3.1
github.com/google/go-cmp v0.3.1
github.com/google/go-cmp v0.3.1 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/gorilla/mux v1.7.3 // indirect
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 // indirect

View File

@ -22,7 +22,6 @@ import (
info "github.com/google/cadvisor/info/v1"
"github.com/google/cadvisor/utils/sysfs"
"github.com/google/go-cmp/cmp"
"k8s.io/klog/v2"
)
@ -328,7 +327,7 @@ func addCacheInfo(sysFs sysfs.SysFs, node *info.Node) error {
// Add a node-level cache.
cacheFound := false
for _, nodeCache := range node.Caches {
if cmp.Equal(nodeCache, c) {
if nodeCache == c {
cacheFound = true
}
}