Code cleanup and badges

This commit is contained in:
Anton Postov committed 2018-02-17 10:51:20 +03:00
1 parent cf4c157141
commit a9c5d5a953
6 files changed
+32 -31

No files matched your search

+4 -6
View File
@@ -1,8 +1,9 @@
package main
import (
"github.com/nbutton23/zxcvbn-go"
"strings"
"github.com/nbutton23/zxcvbn-go"
)
// check each line of a diff and see if there are any potential secrets
@@ -38,7 +39,7 @@ func checkEntropy(target string) bool {
}
// TODO check for stop words here
target = strings.Trim(target[index[1]:len(target)], " ")
target = strings.Trim(target[index[1]:], " ")
if len(target) > 70 {
return false
@@ -47,8 +48,5 @@ func checkEntropy(target string) bool {
entropy := zxcvbn.PasswordStrength(target, nil).Entropy
// tune this/make option
if entropy > 70 {
return true
}
return false
return entropy > 70
}