PwnedPass is a Go library for accessing the Pwned Password API. It currently only supports the V2 version of the API. It's got a dead simple API, tests, and benchmarks.
See godoc for usage and documentation.
You can visit releases to download a stable version of the CLI tool, or you can install from the latest source with:
go get github.com/fharding1/pwnedpass/cmd/pwnedpass
Using the CLI tool is fairly simple:
pwnedpass password
pwnedpass "a password with spaces"
Running on my computer, the benchmark results I get are:
BenchmarkCount-8 5000 216640 ns/op
BenchmarkCountIntegration-8 50 26431351 ns/op
The test with a mock local HTTP server takes about 231893 ns/op, while the integration tests against the actual API take 24331000 ns/op, meaning the only real limitation is the speed of the API and your network.