Skip to content

Commit

Permalink
delete redudant code
Browse files Browse the repository at this point in the history
  • Loading branch information
kongfei605 committed Mar 15, 2023
1 parent 57466eb commit 2f4a3f8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions logs/util/containers/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,12 @@ func (cf Filter) IsExcluded(containerName, containerImage, podNamespace string)

// Check if excludeListed
for _, r := range cf.ImageExcludeList {
if r.MatchString(containerImage) {
if coreconfig.Config.DebugMode {
log.Printf("D!, exclude item :%+v, container image:%s, true\n", r, containerImage)
}
return true
}
match := r.MatchString(containerImage)
if coreconfig.Config.DebugMode {
log.Printf("D! exclude item :%+v, container image:%s, false", r, containerImage)
log.Printf("D!, exclude item :%+v, container image:%s, %t\n", r, containerImage, match)
}
if match {
return true
}
}
for _, r := range cf.NameExcludeList {
Expand Down

0 comments on commit 2f4a3f8

Please sign in to comment.