mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-27 06:44:40 +01:00
Add <- to channel types
This commit is contained in:
parent
ec8854e1b2
commit
1bea9d8587
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user