Skip to content

Commit

Permalink
Optimize verification code resources
Browse files Browse the repository at this point in the history
  • Loading branch information
wenlng committed Dec 19, 2021
1 parent d58962c commit 252c95a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions captcha/assets/bin.go

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion captcha/assets/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func findAsset(path string) ([]byte, error) {
*/
func DefaultBinFontList() []string {
return []string{
"assets/fonts/fzshengsksjw_cu.ttf",
"assets/fonts/hyrunyuan.ttf",
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/captcha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ func TestSetThumbSize(t *testing.T) {

capt.SetThumbSize(&captcha.Size{Width: 300, Height: 300})

chars := []string{"HE", "CA", "WO", "NE", "HT", "IE", "PG", "GI", "CH", "CO", "DA"}
_ = capt.SetRangChars(chars)
//capt.SetImageFontDistort(0)
//capt.SetImageFontDistort(0)
dots, b64, tb64, key, err := capt.Generate()
if err != nil {
panic(err)
return
}

file := getPWD() + "/tests/.cache/" + fmt.Sprintf("%v", captcha.RandInt(1, 200)) + "Img.png"
logFile, _ := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
defer logFile.Close()
Expand Down

0 comments on commit 252c95a

Please sign in to comment.