mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-22 06:46:50 +00:00
cosmetic
This commit is contained in:
@@ -39,16 +39,13 @@ func (c EdgeMetadatas) Add(key string, value EdgeMetadata) EdgeMetadatas {
|
||||
if existingValue, ok := c.psMap.Lookup(key); ok {
|
||||
value = value.Merge(existingValue.(EdgeMetadata))
|
||||
}
|
||||
return EdgeMetadatas{
|
||||
c.psMap.Set(key, value),
|
||||
}
|
||||
return EdgeMetadatas{c.psMap.Set(key, value)}
|
||||
}
|
||||
|
||||
// Lookup the counter 'key'
|
||||
func (c EdgeMetadatas) Lookup(key string) (EdgeMetadata, bool) {
|
||||
if c.psMap != nil {
|
||||
existingValue, ok := c.psMap.Lookup(key)
|
||||
if ok {
|
||||
if existingValue, ok := c.psMap.Lookup(key); ok {
|
||||
return existingValue.(EdgeMetadata), true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,9 +41,7 @@ func (s Sets) Add(key string, value StringSet) Sets {
|
||||
if existingValue, ok := s.psMap.Lookup(key); ok {
|
||||
value = value.Merge(existingValue.(StringSet))
|
||||
}
|
||||
return Sets{
|
||||
psMap: s.psMap.Set(key, value),
|
||||
}
|
||||
return Sets{psMap: s.psMap.Set(key, value)}
|
||||
}
|
||||
|
||||
// Delete the given set from the Sets.
|
||||
@@ -51,9 +49,7 @@ func (s Sets) Delete(key string) Sets {
|
||||
if s.psMap == nil {
|
||||
return EmptySets
|
||||
}
|
||||
return Sets{
|
||||
psMap: s.psMap.Delete(key),
|
||||
}
|
||||
return Sets{psMap: s.psMap.Delete(key)}
|
||||
}
|
||||
|
||||
// Lookup returns the sets stored under key.
|
||||
|
||||
Reference in New Issue
Block a user