This commit is contained in:
zhangwenjian
2020-09-29 08:41:20 +08:00
parent 677cdb7821
commit bc648c3f2f
60 changed files with 2319 additions and 550 deletions
-10
View File
@@ -14,16 +14,6 @@ import (
"golang.org/x/crypto/bcrypt"
)
// 不建议使用的方法(即将过时)
// Deprecated method (out of date)
func StrToInt(err error, index string) int {
result, err := strconv.Atoi(index)
if err != nil {
HasError(err, "string to int error"+err.Error(), -1)
}
return result
}
func CompareHashAndPassword(e string, p string) (bool, error) {
err := bcrypt.CompareHashAndPassword([]byte(e), []byte(p))
if err != nil {