Do not directly cast io.ReadSeeker to io.Reader
`golint` had the following issue when linting this file: ``` daemon/logger/jsonfilelog/read.go:116:10: should omit type io.Reader from declaration of var rdr; it will be inferred from the right-hand side ``` In order to keep it happy changing it to an indirect assignment will still maintain the same functionality. Signed-off-by: Tom Booth <tombooth@gmail.com>
This commit is contained in:
parent
a6a38f811f
commit
6314bec641
1 changed files with 2 additions and 1 deletions
|
@ -113,7 +113,8 @@ func (l *JSONFileLogger) readLogs(logWatcher *logger.LogWatcher, config logger.R
|
|||
}
|
||||
|
||||
func tailFile(f io.ReadSeeker, logWatcher *logger.LogWatcher, tail int, since time.Time) {
|
||||
var rdr io.Reader = f
|
||||
var rdr io.Reader
|
||||
rdr = f
|
||||
if tail > 0 {
|
||||
ls, err := tailfile.TailFile(f, tail)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue