Skip to content

Commit

Permalink
lipstick: make array when filters is nil
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew authored and knative-prow-robot committed Nov 5, 2024
1 parent 858a0e8 commit b9e413d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func updateOrAddSubscription(subscriptions []fn.KnativeSubscription, cfg subscib
for i, subscription := range subscriptions {
if subscription.Source == cfg.Source {
found = true

if subscription.Filters == nil {
subscription.Filters = make(map[string]string)
}

// Update filters. Override if the key already exists.
for newKey, newValue := range newFilters {
subscription.Filters[newKey] = newValue
Expand Down

0 comments on commit b9e413d

Please sign in to comment.