diff options
| author | Felix Hanley <felix@userspace.com.au> | 2016-01-18 10:06:16 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2016-01-18 10:06:16 +0000 |
| commit | 961826fd7bc80bbbc356c216ca11ae9035a3f513 (patch) | |
| tree | 98bc39f04565e1cd4b3e74222583f9851900374d /README.md | |
| parent | cf6be87a86673aa8cde10935c6558b33a962a90e (diff) | |
| download | go-recaptcha-961826fd7bc80bbbc356c216ca11ae9035a3f513.tar.gz go-recaptcha-961826fd7bc80bbbc356c216ca11ae9035a3f513.tar.bz2 | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..6255501 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +go-recaptcha +============ + +About +----- + +This package handles reCaptcha (http://www.google.com/recaptcha) form +submissions in Go (http://golang.org/). + +Usage +----- + +Install the package in your environment using `go get`: + +``` +go get github.com/felix/go-recaptcha +``` + +or as part of your source if using [gb](http://getgb.io/). + +To use it within your own code, import "github.com/felix/go-recaptcha" and call: + +``` +recaptcha.Verify(secret, response, remoteip) +``` + +for each reCaptcha form input you need to check, using the values obtained by +reading the form's POST parameters. + +The recaptcha.Verify() function returns a Response struct defined as: + +``` +type Response struct { + Success bool `json:"success"` + // Errors from reCaptcha service + ErrorCodes []string `json:"error-codes"` + // Our errors to caller + Errors []error `json:"-"` +} +``` |
