mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
1 parent
d8cd93cabe
commit
3474c58c9e
58 files changed
+264
-337
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// Package reggen generates text based on regex definitions
|
||||
// This is a slightly altered version of https://github.com/lucasjones/reggen
|
||||
package secrets
|
||||
|
||||
import (
|
||||
"github.com/lucasjones/reggen"
|
||||
)
|
||||
|
||||
func NewSecret(regex string) string {
|
||||
g, err := reggen.NewGenerator(regex)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return g.Generate(1)
|
||||
}
|
||||
Reference in new issue
Block a user