mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03:00
Add some missing doc comments
As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though.
This commit is contained in:
parent
9891c0fb0e
commit
81c13171a9
30 changed files with 109 additions and 23 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
// Batcher batches file watch events in a given interval.
|
||||
type Batcher struct {
|
||||
*fsnotify.Watcher
|
||||
interval time.Duration
|
||||
|
@ -27,6 +28,7 @@ type Batcher struct {
|
|||
Events chan []fsnotify.Event // Events are returned on this channel
|
||||
}
|
||||
|
||||
// New creates and starts a Batcher with the given time interval.
|
||||
func New(interval time.Duration) (*Batcher, error) {
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
|
||||
|
@ -64,6 +66,7 @@ OuterLoop:
|
|||
close(b.done)
|
||||
}
|
||||
|
||||
// Close stops the watching of the files.
|
||||
func (b *Batcher) Close() {
|
||||
b.done <- struct{}{}
|
||||
b.Watcher.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue