mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/promscrape/discovery/kubernetes: make golangci-lint
happy by removing empty branches
This commit is contained in:
parent
180829b8c2
commit
110a888e39
@ -573,15 +573,11 @@ func (uw *urlWatcher) readObjectUpdateStream(r io.Reader) error {
|
||||
key := o.key()
|
||||
uw.gw.mu.Lock()
|
||||
if _, ok := uw.objectsByKey[key]; !ok {
|
||||
if we.Type == "MODIFIED" {
|
||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
||||
}
|
||||
// if we.Type == "MODIFIED" is expected condition after recovering from the bookmarked resourceVersion.
|
||||
uw.objectsCount.Inc()
|
||||
uw.objectsAdded.Inc()
|
||||
} else {
|
||||
if we.Type == "ADDED" {
|
||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
||||
}
|
||||
// if we.Type == "ADDED" is expected condition after recovering from the bookmarked resourceVersion.
|
||||
uw.objectsUpdated.Inc()
|
||||
}
|
||||
uw.objectsByKey[key] = o
|
||||
@ -599,9 +595,7 @@ func (uw *urlWatcher) readObjectUpdateStream(r io.Reader) error {
|
||||
}
|
||||
key := o.key()
|
||||
uw.gw.mu.Lock()
|
||||
if _, ok := uw.objectsByKey[key]; !ok {
|
||||
// This is expected condition after recovering from the bookmarked resourceVersion.
|
||||
} else {
|
||||
if _, ok := uw.objectsByKey[key]; ok {
|
||||
uw.objectsCount.Dec()
|
||||
uw.objectsRemoved.Inc()
|
||||
delete(uw.objectsByKey, key)
|
||||
|
Loading…
Reference in New Issue
Block a user