File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import (
22
22
)
23
23
24
24
var (
25
- ErrStop = fmt . Errorf ("tail should now stop" )
25
+ ErrStop = errors . New ("tail should now stop" )
26
26
)
27
27
28
28
type Line struct {
@@ -250,7 +250,7 @@ func (tail *Tail) tailFileSync() {
250
250
251
251
tail .openReader ()
252
252
253
- var offset int64 = 0
253
+ var offset int64
254
254
var err error
255
255
256
256
// Read line by line.
@@ -273,10 +273,9 @@ func (tail *Tail) tailFileSync() {
273
273
if cooloff {
274
274
// Wait a second before seeking till the end of
275
275
// 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 )}
280
279
select {
281
280
case <- time .After (time .Second ):
282
281
case <- tail .Dying ():
You can’t perform that action at this time.
0 commit comments