File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -278,14 +278,14 @@ func (r *JournalReader) SkipN(n int) (int, error) {
278278
279279// FollowTail synchronously follows the JournalReader, writing each new journal entry to entries.
280280// It will start from the next unread entry.
281- func (r * JournalReader ) FollowTail (entries chan * JournalEntry , ctx context.Context ) error {
281+ func (r * JournalReader ) FollowTail (entries chan <- * JournalEntry , errors chan <- error , ctx context.Context ) {
282282 defer close (entries )
283283
284284 for {
285285 select {
286286 case <- ctx .Done ():
287287 fmt .Println ("Context done, exit FollowTail" )
288- return nil
288+ return
289289 default :
290290 }
291291
@@ -296,14 +296,14 @@ func (r *JournalReader) FollowTail(entries chan *JournalEntry, ctx context.Conte
296296
297297 for {
298298 if c , err := r .journal .Next (); err != nil {
299- return err
299+ errors <- err
300300 } else if c == 0 {
301301 // EOF, should mean we're at the tail
302302 break
303303 }
304304
305305 if entry , err := r .journal .GetEntry (); err != nil {
306- return err
306+ errors <- err
307307 } else {
308308 entries <- entry
309309 }
You can’t perform that action at this time.
0 commit comments