We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ce6476 commit def2bd5Copy full SHA for def2bd5
captcha.go
@@ -35,9 +35,9 @@ type Captcha struct {
35
}
36
37
type CaptchaResult struct {
38
- DrawRects []DrawRect
39
- Text string
40
- ImageBase64 string
+ DrawRects []DrawRect `json:"draw_rect"`
+ Text string `json:"text"`
+ ImageBase64 string `json:"image_base64"`
41
42
43
func NewCaptcha(width, height int) *Captcha {
point.go
@@ -1,15 +1,15 @@
1
package captcha
2
3
type Point struct {
4
- X int
5
- Y int
+ X int `json:"x"`
+ Y int `json:"y"`
6
7
8
type DrawRect struct {
9
10
11
- Width int
12
- Height int
+ Width int `json:"width"`
+ Height int `json:"height"`
13
14
15
func NewPoint(x int, y int) *Point {
0 commit comments