mirror of https://github.com/knative/pkg.git
Fix an annoying nit (#964)
Allocate as many as you're asked -- not just 1. /assign mattmoor
This commit is contained in:
parent
bb8b596645
commit
587055b113
|
|
@ -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...)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue