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
This commit is contained in:
Cameron Moore 2018-09-06 13:23:56 -05:00 committed by Bjørn Erik Pedersen
parent daffeec30d
commit a53f962312

3
deps/deps.go vendored
View file

@ -76,6 +76,7 @@ type Deps struct {
BuildStartListeners *Listeners
}
// Listeners represents an event listener.
type Listeners struct {
sync.Mutex
@ -83,12 +84,14 @@ type Listeners struct {
listeners []func()
}
// Add adds a function to a Listeners instance.
func (b *Listeners) Add(f func()) {
b.Lock()
defer b.Unlock()
b.listeners = append(b.listeners, f)
}
// Notify executes all listener functions.
func (b *Listeners) Notify() {
b.Lock()
defer b.Unlock()