mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
feat(generate): generate global (#1546)
This commit is contained in:
1 parent
f6e549901c
commit
82d737d851
6 files changed
+361
-499
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/base"
|
||||
"os"
|
||||
"text/template"
|
||||
|
||||
@@ -228,7 +229,9 @@ func main() {
|
||||
log.Fatal().Err(err).Msg("Failed to create rules.toml")
|
||||
}
|
||||
|
||||
if err = tmpl.Execute(f, config.Config{Rules: ruleLookUp}); err != nil {
|
||||
cfg := base.CreateGlobalConfig()
|
||||
cfg.Rules = ruleLookUp
|
||||
if err = tmpl.Execute(f, cfg); err != nil {
|
||||
log.Fatal().Err(err).Msg("could not execute template")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user