Package captcha provides an easy to use
I want a simple package. It should be flexible and not rely on rendering images but rather return HTML SVG code.
go get -u github.com/reu98/go-svg-captcha
import captcha "github.com/reu98/go-svg-captcha"
func main() {
option := captcha.OptionText
result, err := captcha.CreateByText(option)
if err != nil {
log.Fatalln(err)
}
// Text
fmt.Printf("Text: %v", (*result).Text)
// HTML SVG
fmt.Printf("SVG: %v", (*result).Data)
}
This package uses embedding from Go 1.21. If you're using a version before 1.21, please upgrade to 1.21 to utilize this package.
If your found a bug, please contribute! see contributing.md for more detail.
- Finish Documentation
- Generate multiple captchas
- Write image
- Upload the image to the cloud
- Create a captcha storage to use with the API