Closed faizann closed 7 years ago
Tailing a file reads the whole file from start. We need a switch which will only read new lines after the start of tailing.
It was my mistake. The Seek allows to do so
seekInfo := tail.SeekInfo{Offset:0, Whence:os.SEEK_END} t, err := tail.TailFile(myfilepath, tail.Config{Follow: true, Poll: true, ReOpen: true, Location: &seekInfo})
Tailing a file reads the whole file from start. We need a switch which will only read new lines after the start of tailing.