ref: a53f962312e273cea9fe460b40655350a82210f2
parent: daffeec30d9d67017ec84064e15fd946b0b0cb0d
author: Cameron Moore <moorereason@gmail.com>
date: Thu Sep 6 09:23:56 EDT 2018
deps: Fix most golint issues deps/deps.go:79:6: exported type Listeners should have comment or be unexported deps/deps.go:86:1: exported method Listeners.Add should have comment or be unexported deps/deps.go:92:1: exported method Listeners.Notify should have comment or be unexported
--- a/deps/deps.go
+++ b/deps/deps.go
@@ -76,6 +76,7 @@
BuildStartListeners *Listeners
}
+// Listeners represents an event listener.
type Listeners struct {
sync.Mutex
@@ -83,6 +84,7 @@
listeners []func()
}
+// Add adds a function to a Listeners instance.
func (b *Listeners) Add(f func()) {
b.Lock()
defer b.Unlock()
@@ -89,6 +91,7 @@
b.listeners = append(b.listeners, f)
}
+// Notify executes all listener functions.
func (b *Listeners) Notify() {
b.Lock()
defer b.Unlock()
--
⑨