When I moved implementation to pkg directory an error appeared that DwellingCaptcha doesn't implement generateImage() method. And these methods was copied here to resolve this problem. But, actual fix was implementing an empty generateImage() method for base Captcha struct.
This commit is contained in:
parent
8053952122
commit
9e7f3a2728
@ -73,20 +73,3 @@ func (c *DwellingCaptcha) GetImage() *image.Image {
|
|||||||
|
|
||||||
return &c.Image
|
return &c.Image
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *DwellingCaptcha) GetAnswer() captcha.Answer {
|
|
||||||
return c.Answer
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *DwellingCaptcha) Solve(answer captcha.Answer) bool {
|
|
||||||
c.Solved = c.Answer == answer
|
|
||||||
return c.Solved
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *DwellingCaptcha) IsSolved() bool {
|
|
||||||
return c.Solved
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *DwellingCaptcha) Expiry() time.Time {
|
|
||||||
return c.ExpireIn
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user