mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 00:24:58 +00:00
Fix various typos (#416)
Fix various typos found via `codespell -q 3 -S vendor -L pullrequest,pullrequests`
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user