Skip to content

Commit

Permalink
Update drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jun 17, 2020
1 parent 4074ad8 commit 1d66d54
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/audio.go
Expand Up @@ -5,6 +5,7 @@
package drivers

import (
"clevergo.tech/captchas"
"github.com/mojocn/base64Captcha"
)

Expand Down Expand Up @@ -34,6 +35,8 @@ type Audio struct {
language string
}

var _ captchas.Driver = NewAudio()

// NewAudio returns an audio driver.
func NewAudio(opts ...AudioOption) *Audio {
d := &Audio{
Expand Down
3 changes: 3 additions & 0 deletions drivers/chinese.go
Expand Up @@ -7,6 +7,7 @@ package drivers
import (
"image/color"

"clevergo.tech/captchas"
"github.com/mojocn/base64Captcha"
)

Expand Down Expand Up @@ -81,6 +82,8 @@ type Chinese struct {

const defaultChineseSource = "零一二三四五六七八九十"

var _ captchas.Driver = NewChinese()

// NewChinese returns a chinese driver.
func NewChinese(opts ...ChineseOption) *Chinese {
d := &Chinese{
Expand Down
3 changes: 3 additions & 0 deletions drivers/digit.go
Expand Up @@ -5,6 +5,7 @@
package drivers

import (
"clevergo.tech/captchas"
"github.com/mojocn/base64Captcha"
)

Expand Down Expand Up @@ -61,6 +62,8 @@ type Digit struct {
dotCount int
}

var _ captchas.Driver = NewDigit()

// NewDigit return a digit driver.
func NewDigit(opts ...DigitOption) *Digit {
d := &Digit{
Expand Down
2 changes: 2 additions & 0 deletions drivers/go.sum
@@ -1,3 +1,5 @@
clevergo.tech/captchas v0.1.0 h1:ChR82wrJz/8aarkyxFg/gXH9ysBBaBZZZBXQgVu2xSo=
clevergo.tech/captchas v0.1.0/go.mod h1:PbpBsWyXUc4UJJl+/Nn4YStY8kFnYFt6tw3gwcRemVo=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/mojocn/base64Captcha v1.3.0 h1:2mWu9fUoOx3ribrrsm4+8/UknSn8/g/xmPOkTwiY2Fo=
Expand Down
3 changes: 3 additions & 0 deletions drivers/math.go
Expand Up @@ -7,6 +7,7 @@ package drivers
import (
"image/color"

"clevergo.tech/captchas"
"github.com/mojocn/base64Captcha"
)

Expand Down Expand Up @@ -63,6 +64,8 @@ type Math struct {
fonts []string
}

var _ captchas.Driver = NewMath()

// NewMath return a math driver.
func NewMath(opts ...MathOption) *Math {
d := &Math{
Expand Down
3 changes: 3 additions & 0 deletions drivers/string.go
Expand Up @@ -7,6 +7,7 @@ package drivers
import (
"image/color"

"clevergo.tech/captchas"
"github.com/mojocn/base64Captcha"
)

Expand Down Expand Up @@ -81,6 +82,8 @@ type Str struct {

const defaultStringSource = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

var _ captchas.Driver = NewString()

// NewString returns a string driver.
func NewString(opts ...StringOption) *Str {
d := &Str{
Expand Down

0 comments on commit 1d66d54

Please sign in to comment.