Add nilaway and rework test setup

This commit is contained in:
eikendev 2025-02-16 00:15:50 +01:00
parent e657884326
commit b0699da1e9
No known key found for this signature in database
15 changed files with 309 additions and 184 deletions

View file

@ -33,6 +33,9 @@ func IsPasswordPwned(password string) (bool, error) {
if err != nil {
return false, err
}
if resp == nil {
return false, fmt.Errorf("received nil response from http request")
}
if resp.StatusCode != http.StatusOK {
log.L.Fatalf("Request failed with HTTP %s.", resp.Status)