File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import (
2222)
2323
2424var (
25- ErrStop = fmt . Errorf ("tail should now stop" )
25+ ErrStop = errors . New ("tail should now stop" )
2626)
2727
2828type Line struct {
@@ -250,7 +250,7 @@ func (tail *Tail) tailFileSync() {
250250
251251 tail .openReader ()
252252
253- var offset int64 = 0
253+ var offset int64
254254 var err error
255255
256256 // Read line by line.
@@ -273,10 +273,9 @@ func (tail *Tail) tailFileSync() {
273273 if cooloff {
274274 // Wait a second before seeking till the end of
275275 // file when rate limit is reached.
276- msg := fmt .Sprintf (
277- "Too much log activity; waiting a second " +
278- "before resuming tailing" )
279- tail .Lines <- & Line {msg , time .Now (), fmt .Errorf (msg )}
276+ msg := ("Too much log activity; waiting a second " +
277+ "before resuming tailing" )
278+ tail .Lines <- & Line {msg , time .Now (), errors .New (msg )}
280279 select {
281280 case <- time .After (time .Second ):
282281 case <- tail .Dying ():
You can’t perform that action at this time.
0 commit comments