Fix an annoying nit (#964)

Allocate as many as you're asked -- not just 1.

/assign mattmoor
This commit is contained in:
Victor Agababov 2019-12-26 16:36:30 -08:00 committed by Knative Prow Robot
parent bb8b596645
commit 587055b113
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func (w *ManualWatcher) Watch(name string, o ...Observer) {
defer w.m.Unlock()
if w.observers == nil {
w.observers = make(map[string][]Observer, 1)
w.observers = make(map[string][]Observer, len(o))
}
w.observers[name] = append(w.observers[name], o...)
}