mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-06 01:08:03 +00:00
Merge pull request #890 from weaveworks/refactor-deepequal
refactoring deepequal to satisfy linter
This commit is contained in:
@@ -108,12 +108,7 @@ func (c Counters) String() string {
|
||||
}
|
||||
|
||||
// DeepEqual tests equality with other Counters
|
||||
func (c Counters) DeepEqual(i interface{}) bool {
|
||||
d, ok := i.(Counters)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
func (c Counters) DeepEqual(d Counters) bool {
|
||||
if (c.psMap == nil) != (d.psMap == nil) {
|
||||
return false
|
||||
} else if c.psMap == nil && d.psMap == nil {
|
||||
|
||||
@@ -128,12 +128,7 @@ func (c EdgeMetadatas) String() string {
|
||||
}
|
||||
|
||||
// DeepEqual tests equality with other Counters
|
||||
func (c EdgeMetadatas) DeepEqual(i interface{}) bool {
|
||||
d, ok := i.(EdgeMetadatas)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
func (c EdgeMetadatas) DeepEqual(d EdgeMetadatas) bool {
|
||||
if c.Size() != d.Size() {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -142,12 +142,7 @@ func (m LatestMap) String() string {
|
||||
}
|
||||
|
||||
// DeepEqual tests equality with other LatestMap
|
||||
func (m LatestMap) DeepEqual(i interface{}) bool {
|
||||
n, ok := i.(LatestMap)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m LatestMap) DeepEqual(n LatestMap) bool {
|
||||
if m.Size() != n.Size() {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -104,12 +104,7 @@ func (s Sets) String() string {
|
||||
}
|
||||
|
||||
// DeepEqual tests equality with other Sets
|
||||
func (s Sets) DeepEqual(i interface{}) bool {
|
||||
t, ok := i.(Sets)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s Sets) DeepEqual(t Sets) bool {
|
||||
if s.psMap.Size() != t.psMap.Size() {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user