use embed pkg for default config, update deps (#616)

This commit is contained in:
Zachary Rice authored and GitHub committed 2021-09-02 14:42:14 -05:00
1 parent 3c1751e5c4
commit abc73e2443
4 files changed
+64 -52

No files matched your search

+5 -1
View File
@@ -1,6 +1,7 @@
package config
import (
_ "embed"
"fmt"
"io"
"os"
@@ -16,6 +17,9 @@ import (
log "github.com/sirupsen/logrus"
)
//go:embed gitleaks.toml
var DefaultConfig string
// Config is a composite struct of Rules and Allowlists
// Each Rule contains a description, regular expression, tags, and allowlists if available
type Config struct {
@@ -42,7 +46,7 @@ type TomlAllowList struct {
}
// TomlLoader gets loaded with the values from a gitleaks toml config
// see the config in config/defaults.go for an example. TomlLoader is used
// see the config in config/gitleaks.toml for an example. TomlLoader is used
// to generate Config values (compiling regexes, etc).
type TomlLoader struct {
AllowList TomlAllowList