clear:formatting code

This commit is contained in:
zhangwenjian committed 2020-07-23 12:03:17 +08:00
1 parent 426cec1b62
commit 8c554d7ee7
52 files changed
+486 -502

No files matched your search

+3 -5
View File
@@ -20,9 +20,8 @@ type configJsonBody struct {
DriverDigit *base64Captcha.DriverDigit
}
func DriverStringFunc() (id, b64s string, err error) {
e :=configJsonBody{}
func DriverStringFunc() (id, b64s string, err error) {
e := configJsonBody{}
e.Id = uuid.New().String()
e.DriverString = base64Captcha.NewDriverString(46, 140, 2, 2, 4, "234567890abcdefghjkmnpqrstuvwxyz", &color.RGBA{240, 240, 246, 246}, []string{"wqy-microhei.ttc"})
driver := e.DriverString.ConvertFonts()
@@ -30,7 +29,6 @@ func DriverStringFunc() (id, b64s string, err error) {
return cap.Generate()
}
func DriverDigitFunc() (id, b64s string, err error) {
e := configJsonBody{}
e.Id = uuid.New().String()
@@ -38,4 +36,4 @@ func DriverDigitFunc() (id, b64s string, err error) {
driver := e.DriverDigit
cap := base64Captcha.NewCaptcha(driver, store)
return cap.Generate()
}
}