mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
rm some silly logic, better comments
This commit is contained in:
1 parent
fa498287b9
commit
8e59bf766a
7 files changed
+60
-83
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
)
|
||||
@@ -34,8 +33,6 @@ func init() {
|
||||
stopWords = []string{"setting", "info", "env", "environment"}
|
||||
fileDiffRegex = regexp.MustCompile("diff --git a.+b/")
|
||||
assignRegex = regexp.MustCompile(`(=|:|:=|<-)`)
|
||||
|
||||
// TODO Externalize regex... this is tricky making it yml compliant
|
||||
regexes = map[string]*regexp.Regexp{
|
||||
"PKCS8": regexp.MustCompile("-----BEGIN PRIVATE KEY-----"),
|
||||
"RSA": regexp.MustCompile("-----BEGIN RSA PRIVATE KEY-----"),
|
||||
@@ -56,8 +53,3 @@ func main() {
|
||||
owner := newOwner()
|
||||
os.Exit(owner.auditRepos())
|
||||
}
|
||||
|
||||
func failF(format string, args ...interface{}) {
|
||||
fmt.Fprintf(os.Stderr, format, args...)
|
||||
os.Exit(ExitFailure)
|
||||
}
|
||||
Reference in new issue
Block a user