Changed Expire() method in ICaptcha to Expiry().

ExpireDate() changed to ExpiryDate() and its argument expiration changed to expiry.
This commit is contained in:
Alexander Andreev 2022-06-26 20:47:25 +04:00
parent d04870ae40
commit 2e3d41a628
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -24,7 +24,7 @@ type ICaptcha interface {
GetAnswer() Answer GetAnswer() Answer
Solve(answer Answer) bool Solve(answer Answer) bool
IsSolved() bool IsSolved() bool
Expire() time.Time Expiry() time.Time
} }
type Captcha struct { type Captcha struct {
@ -39,6 +39,6 @@ func GenerateAnswer() Answer {
return (Answer(ans.String())) return (Answer(ans.String()))
} }
func ExpireDate(expiration time.Duration) time.Time { func ExpiryDate(expiry time.Duration) time.Time {
return time.Now().Add(expiration) return time.Now().Add(expiry)
} }