GenerateImage() method was changed to be private.
This commit is contained in:
parent
3ebfcb2c95
commit
a23c80ae88
@ -25,7 +25,7 @@ func NewDwellingCaptcha(expiry time.Duration) *DwellingCaptcha {
|
|||||||
ExpireIn: ExpiryDate(expiry)}}
|
ExpireIn: ExpiryDate(expiry)}}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *DwellingCaptcha) GenerateImage() *image.Image {
|
func (c *DwellingCaptcha) generateImage() *image.Image {
|
||||||
ctx := gg.NewContext(dwImageWidth, dwImageHeight)
|
ctx := gg.NewContext(dwImageWidth, dwImageHeight)
|
||||||
|
|
||||||
// fill background
|
// fill background
|
||||||
@ -67,7 +67,7 @@ func (c *DwellingCaptcha) GenerateImage() *image.Image {
|
|||||||
|
|
||||||
func (c *DwellingCaptcha) GetImage() *image.Image {
|
func (c *DwellingCaptcha) GetImage() *image.Image {
|
||||||
if c.Image == nil {
|
if c.Image == nil {
|
||||||
return c.GenerateImage()
|
return c.generateImage()
|
||||||
}
|
}
|
||||||
|
|
||||||
return &c.Image
|
return &c.Image
|
||||||
|
Loading…
Reference in New Issue
Block a user