mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
25 lines
756 B
Go
25 lines
756 B
Go
package detect
|
|
|
|
// Fragment contains the data to be scanned
|
|
type Fragment struct {
|
|
// Raw is the raw content of the fragment
|
|
Raw string
|
|
|
|
Bytes []byte
|
|
|
|
// FilePath is the path to the file, if applicable.
|
|
// The path separator MUST be normalized to `/`.
|
|
FilePath string
|
|
SymlinkFile string
|
|
// WindowsFilePath is the path with the original separator.
|
|
// This provides a backwards-compatible solution to https://github.com/gitleaks/gitleaks/issues/1565.
|
|
WindowsFilePath string `json:"-"` // TODO: remove this in v9.
|
|
|
|
// CommitSHA is the SHA of the commit if applicable
|
|
CommitSHA string
|
|
|
|
// newlineIndices is a list of indices of newlines in the raw content.
|
|
// This is used to calculate the line location of a finding
|
|
newlineIndices [][]int
|
|
}
|