In instance.go GetExpireInterval() changed to GetExpiry(). And changed name of corresponding field of CaptchaDB to ExpireIn.

This commit is contained in:
Alexander Andreev 2022-06-26 20:53:48 +04:00
parent bb4b3bd1ba
commit 3251b68629
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F
1 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,8 @@ import (
var captchaDb CaptchaDB = CaptchaDB{
DB: make(map[ID]ICaptcha)}
func Init(expiration time.Duration) {
captchaDb.SetExpiration(expiration)
func Init(expiry time.Duration) {
captchaDb.SetExpiry(expiry)
}
func New(data string, captcha ICaptcha) (ICaptcha, ID) {
@ -28,6 +28,6 @@ func IsSolved(id ID) (bool, error) {
return captchaDb.IsSolved(id)
}
func GetExpireInterval() time.Duration {
return captchaDb.ExpireInterval
func GetExpiry() time.Duration {
return captchaDb.ExpireIn
}