1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-27 04:24:56 +01:00

Add <- to channel types

This commit is contained in:
Oliver Steele 2017-06-29 14:21:27 -04:00
parent ec8854e1b2
commit 1bea9d8587

View File

@ -62,8 +62,8 @@ func (s *Server) watchFiles() error {
// debounce relays values from input to output, merging successive values within interval
// TODO consider https://github.com/ReactiveX/RxGo
func debounce(interval time.Duration, input chan string) (output chan []string) {
output = make(chan []string)
func debounce(interval time.Duration, input <-chan string) <-chan []string {
output := make(chan []string)
var (
pending = []string{}
ticker = time.Tick(interval) // nolint: staticcheck, megacheck
@ -81,5 +81,5 @@ func debounce(interval time.Duration, input chan string) (output chan []string)
}
}
}()
return
return output
}