Unify Godoc formatting, fix various typos

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
This commit is contained in:
Vojtech Vitek (V-Teq)
2014-09-02 12:00:28 +02:00
parent 7b44f88c2b
commit 59f58cd043
58 changed files with 241 additions and 243 deletions

View File

@@ -91,7 +91,7 @@ type Accessor interface {
MergedState() interface{}
}
// AccessorFunc implements the Accessor interface
// AccessorFunc implements the Accessor interface.
type AccessorFunc func() interface{}
func (f AccessorFunc) MergedState() interface{} {
@@ -116,20 +116,20 @@ type Watcher struct {
listeners []Listener
}
// Register a set of listeners that support the Listener interface and
// notify them on changes.
// NewWatcher registers a set of listeners that support the Listener interface
// and notify them on changes.
func NewWatcher() *Watcher {
return &Watcher{}
}
// Register Listener to receive updates of changes.
// Add registers listener to receive updates of changes.
func (m *Watcher) Add(listener Listener) {
m.listenerLock.Lock()
defer m.listenerLock.Unlock()
m.listeners = append(m.listeners, listener)
}
// Notify all listeners
// Notify notifies all listeners.
func (m *Watcher) Notify(instance interface{}) {
m.listenerLock.RLock()
listeners := m.listeners