From 9e7f3a27282778c4e779b4cb592657ba0c94fe5d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 26 Jun 2022 23:57:16 +0400 Subject: [PATCH] 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. --- internal/captcha/dwelling_captcha.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/internal/captcha/dwelling_captcha.go b/internal/captcha/dwelling_captcha.go index a660c62..58419ec 100644 --- a/internal/captcha/dwelling_captcha.go +++ b/internal/captcha/dwelling_captcha.go @@ -73,20 +73,3 @@ func (c *DwellingCaptcha) GetImage() *image.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 -}