From 08b4dce7c8eecd87f9242ceb300169388cfcedf4 Mon Sep 17 00:00:00 2001 From: Sven Rebhan Date: Wed, 3 Feb 2021 12:09:20 +0100 Subject: [PATCH] Fix formatting. --- models/running_parsers.go | 2 +- plugins/inputs/tail/tail.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/running_parsers.go b/models/running_parsers.go index ac5b1d72da45e..13db5cbc7bfd4 100644 --- a/models/running_parsers.go +++ b/models/running_parsers.go @@ -117,7 +117,7 @@ func (r *RunningParser) GetParserFunc() telegraf.ParserFunc { if p, ok := r.Parser.(telegraf.StatefulParser); ok { return p.NewInstance } - return func()(telegraf.Parser, error) { return r.Parser, nil } + return func() (telegraf.Parser, error) { return r.Parser, nil } } func (r *RunningParser) Log() telegraf.Logger { diff --git a/plugins/inputs/tail/tail.go b/plugins/inputs/tail/tail.go index 9f7efee821a14..36351f1c90694 100644 --- a/plugins/inputs/tail/tail.go +++ b/plugins/inputs/tail/tail.go @@ -291,7 +291,7 @@ func parseLine(parser telegraf.Parser, line string, lineno int) ([]telegraf.Metr // Parse the header information. No metric to return though. nHeader := p.GetHeaderLineCount() - if lineno < nSkip + nHeader { + if lineno < nSkip+nHeader { err := p.ParseHeaderLine(line) return nil, err }