diff --git a/.idea/captcha.iml b/.idea/captcha.iml deleted file mode 100644 index 5e764c4..0000000 --- a/.idea/captcha.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a4a694b..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/captcha.go b/captcha.go index 00798fa..497c3c7 100644 --- a/captcha.go +++ b/captcha.go @@ -74,9 +74,9 @@ type SetOption func(*Options) // Data is the result of captcha generation. // It has a `Text` field and a private `img` field that will -// be used in `WriteImage` receiver +// be used in `WriteImage` receiver. type Data struct { - // Text is captcha solution + // Text is captcha solution. Text string img *image.NRGBA @@ -122,7 +122,7 @@ func LoadFontFromReader(reader io.Reader) error { } // New creates a new captcha. -// It returns captcha data and any freetype drawing error encountered +// It returns captcha data and any freetype drawing error encountered. func New(width int, height int, option ...SetOption) (*Data, error) { options := newDefaultOption(width, height) for _, setOption := range option { @@ -143,7 +143,7 @@ func New(width int, height int, option ...SetOption) (*Data, error) { } // NewMathExpr creates a new captcha. -// It will generate a image with a math expression like `1 + 2` +// It will generate a image with a math expression like `1 + 2`. func NewMathExpr(width int, height int, option ...SetOption) (*Data, error) { options := newDefaultOption(width, height) for _, setOption := range option { diff --git a/example/basic/main.go b/example/basic/main.go index ae252d8..d7f8790 100644 --- a/example/basic/main.go +++ b/example/basic/main.go @@ -2,9 +2,10 @@ package main import ( "fmt" - "github.com/steambap/captcha" "html/template" "net/http" + + "github.com/steambap/captcha" ) func main() { diff --git a/example/load-font/main.go b/example/load-font/main.go index f50b8ed..ba5820e 100644 --- a/example/load-font/main.go +++ b/example/load-font/main.go @@ -2,10 +2,11 @@ package main import ( "fmt" - "github.com/steambap/captcha" - "golang.org/x/image/font/gofont/goregular" "html/template" "net/http" + + "github.com/steambap/captcha" + "golang.org/x/image/font/gofont/goregular" ) func main() {