mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
log bytes (#1670)
This commit is contained in:
1 parent
a9e6d8c9a7
commit
8a8306288e
3 files changed
+52
-2
No files matched your search
+2
-1
@@ -110,11 +110,12 @@ func (d *Detector) DetectFiles(paths <-chan sources.ScanTarget) ([]report.Findin
|
||||
}
|
||||
|
||||
// Count the number of newlines in this chunk
|
||||
chunk := string(peekBuf.Bytes())
|
||||
chunk := peekBuf.String()
|
||||
linesInChunk := strings.Count(chunk, "\n")
|
||||
totalLines += linesInChunk
|
||||
fragment := Fragment{
|
||||
Raw: chunk,
|
||||
Bytes: peekBuf.Bytes(),
|
||||
FilePath: pa.Path,
|
||||
}
|
||||
if pa.Symlink != "" {
|
||||
|
||||
Reference in new issue
Block a user