Skip to content

Commit

Permalink
feat: Added fast fail for getFeedGroupNames
Browse files Browse the repository at this point in the history
  • Loading branch information
werniq committed Sep 29, 2024
1 parent e6e04d1 commit b770b13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions operator/api/v1/hotnews_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ func init() {

// GetFeedGroupNames returns all config maps which contain hotNew groups names
func (r *HotNews) GetFeedGroupNames(configMapList v1.ConfigMapList) []string {
if configMapList.Items == nil {
return nil
}
var feedGroups []string
for _, configMap := range configMapList.Items {
for _, source := range r.Spec.FeedGroups {
Expand Down

0 comments on commit b770b13

Please sign in to comment.