mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
923dcf0311 | ||
|
|
8896cf66cd | ||
|
|
df133ccaf8 |
No files matched your search
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
1.12.1
|
||||||
|
----
|
||||||
|
- Show program usage when no arguments are provided
|
||||||
|
- Exit program after the -h or --help options are used
|
||||||
1.12.0
|
1.12.0
|
||||||
----
|
----
|
||||||
- removing --csv option
|
- removing --csv option
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ type gitDiff struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const defaultGithubURL = "https://api.github.com/"
|
const defaultGithubURL = "https://api.github.com/"
|
||||||
const version = "1.11.1"
|
const version = "1.12.1"
|
||||||
const errExit = 2
|
const errExit = 2
|
||||||
const leakExit = 1
|
const leakExit = 1
|
||||||
const defaultConfig = `
|
const defaultConfig = `
|
||||||
@@ -207,7 +207,20 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
_, err := flags.Parse(&opts)
|
parser := flags.NewParser(&opts, flags.Default)
|
||||||
|
_, err := parser.Parse()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(os.Args) == 1 {
|
||||||
|
parser.WriteHelp(os.Stdout)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
if opts.Version {
|
if opts.Version {
|
||||||
fmt.Println(version)
|
fmt.Println(version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|||||||
Reference in new issue
Block a user