Fix various typos (#416)

Fix various typos found via `codespell -q 3 -S vendor -L pullrequest,pullrequests`
This commit is contained in:
luzpaz
2021-10-08 12:35:56 -04:00
committed by GitHub
parent 3254a7ca00
commit 9b687a923e
28 changed files with 52 additions and 52 deletions

View File

@@ -28,7 +28,7 @@ type stream struct {
sync.Mutex
path string
hist []*Entry
list []*Entry
subs map[*subscriber]struct{}
done chan struct{}
wait sync.WaitGroup
@@ -69,7 +69,7 @@ func (l *log) Write(c context.Context, path string, entry *Entry) error {
return ErrNotFound
}
s.Lock()
s.hist = append(s.hist, entry)
s.list = append(s.list, entry)
for sub := range s.subs {
go sub.handler(entry)
}
@@ -89,8 +89,8 @@ func (l *log) Tail(c context.Context, path string, handler Handler) error {
handler: handler,
}
s.Lock()
if len(s.hist) != 0 {
sub.handler(s.hist...)
if len(s.list) != 0 {
sub.handler(s.list...)
}
s.subs[sub] = struct{}{}
s.Unlock()
@@ -132,7 +132,7 @@ func (l *log) Snapshot(c context.Context, path string, w io.Writer) error {
return ErrNotFound
}
s.Lock()
for _, entry := range s.hist {
for _, entry := range s.list {
w.Write(entry.Data)
w.Write(cr)
}