Skip to content

Commit 76b7032

Browse files
lipstick: make array when filters is nil (#2571)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
1 parent 462cdc2 commit 76b7032

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/subscribe.go

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ func updateOrAddSubscription(subscriptions []fn.KnativeSubscription, cfg subscib
9595
for i, subscription := range subscriptions {
9696
if subscription.Source == cfg.Source {
9797
found = true
98+
99+
if subscription.Filters == nil {
100+
subscription.Filters = make(map[string]string)
101+
}
102+
98103
// Update filters. Override if the key already exists.
99104
for newKey, newValue := range newFilters {
100105
subscription.Filters[newKey] = newValue

0 commit comments

Comments
 (0)