mirror of
https://github.com/wneessen/go-hibp.git
synced 2024-09-19 01:42:47 +02:00
762 B
762 B
go-hibp - Simple go client for the HIBP API
Usage
Pwned Passwords API
package main
import (
"fmt"
"github.com/wneessen/go-hibp"
)
func main() {
hc := New()
m, _, err := hc.PwnedPassword.CheckPassword("test123")
if err != nil {
panic(err)
}
if m != nil && m.Count != 0 {
fmt.Println("Your password was found in the pwned passwords DB")
}
}