From 13993d87e466e9724248c4356622c66409d40cac Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Fri, 16 Aug 2024 11:52:01 -0700 Subject: [PATCH] adjusted Signed-off-by: Jeff Ortel --- api/analysis.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index 87c0a51c..4b6405c1 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -2900,9 +2900,9 @@ func (r *ManifestReader) scan(path string) (err error) { scanner := bufio.NewScanner(r.file) for scanner.Scan() { content := scanner.Text() - content = strings.TrimSpace(content) - if pattern.Match([]byte(content)) { - r.marker[content] = p + matched := strings.TrimSpace(content) + if pattern.Match([]byte(matched)) { + r.marker[matched] = p } p += int64(len(content)) p++ @@ -2938,7 +2938,7 @@ func (r *ManifestReader) open(path, begin, end string) (reader io.ReadCloser, er } return } - r.begin = r.begin + int64(len(begin)) + r.begin += int64(len(begin)) r.begin++ r.read = r.end - r.begin r.file, err = os.Open(path)