Changed Expire() method in ICaptcha to Expiry().
ExpireDate() changed to ExpiryDate() and its argument expiration changed to expiry.
This commit is contained in:
parent
d04870ae40
commit
2e3d41a628
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user