From f7439eb282a60bd35d8b7cc97d7f95aa1c478357 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 30 Jul 2022 15:31:47 +0400 Subject: [PATCH] Changed interface and DB struct name in instance.go. --- internal/captcha/instance.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/captcha/instance.go b/internal/captcha/instance.go index 238f75a..fea0322 100644 --- a/internal/captcha/instance.go +++ b/internal/captcha/instance.go @@ -6,18 +6,18 @@ import ( "time" ) -var captchaDb captcha.CaptchaDB = captcha.CaptchaDB{ - DB: make(map[captcha.ID]captcha.ICaptcha)} +var captchaDb captcha.InMemoryCaptchaDB = captcha.InMemoryCaptchaDB{ + DB: make(map[captcha.ID]captcha.Captcha)} func Init(expiry time.Duration) { captchaDb.SetExpiry(expiry) } -func New(data string, captcha captcha.ICaptcha) (captcha.ICaptcha, captcha.ID) { +func New(data string, captcha captcha.Captcha) (captcha.Captcha, captcha.ID) { return captchaDb.New(data, captcha) } -func Image(id captcha.ID, style string) (*image.Image, error) { +func Image(id captcha.ID, style string) (image.Image, error) { return captchaDb.Image(id, style) }