mirror of
https://github.com/wneessen/go-hibp.git
synced 2024-12-22 18:20:38 +01:00
No description
Winni Neessen
e42f8b3101
Fixes #22 - In case of a HTTP error the PastedAccount method is supposed to return the HTTP response, since this can hold valuable information about the reason why the request failed. Instead, it was returning `nil`. This PR fixes this behaviour. - Additionally, this PR introduces tests to catch such oversights - Finally a proper `error.New()` error has been introduces, to that `error.Is()` can be used on common error that are detected by the module |
||
---|---|---|
.github | ||
.idea | ||
.cirrus.yml | ||
.gitignore | ||
.golangci.toml | ||
breach.go | ||
breach_test.go | ||
codecov.yml | ||
go.mod | ||
hibp.go | ||
hibp_test.go | ||
LICENSE | ||
password.go | ||
password_test.go | ||
paste.go | ||
paste_test.go | ||
README.md | ||
sonar-project.properties |
go-hibp - Simple Go binding to the "Have I Been Pwned" API
This Go library provides simple bindings to the excellent "Have I Been Pwned" (HIBP) API by Troy Hunt. It implements all 3 APIs that are provided by HIBP (Breaches, Pastes, Passwords). API key support for the private API endpoints are supported as well. go-hibp follows idiomatic Go style and best practice. It's only dependency is the Go Standard Library.
Usage
The library is fully documented using the execellent GoDoc functionality. Check out the GoDocs Reference for details on how to implement access to any of the 3 APIs with this package. You will also find GoDoc code examples there for each of those APIs.