diff --git a/keystatus b/keystatus index 885a911..f4a789b 100755 Binary files a/keystatus and b/keystatus differ diff --git a/keystatus.go b/keystatus.go index 2926a8d..8058e39 100644 --- a/keystatus.go +++ b/keystatus.go @@ -61,15 +61,19 @@ func main() { } // Print the response - if resp.StatusCode == http.StatusOK { + if resp.StatusCode == http.StatusOK { fmt.Println("") fmt.Println("Key status: Active") fmt.Println("Key expire fulldate: ", r.KeyexpireString) fmt.Println("Key expire date: ", r.ExpireDate) fmt.Println("") - } else { + } else if resp.StatusCode == http.StatusUnauthorized { fmt.Println("") fmt.Println("Key status: Expired") fmt.Println("") + } else { + fmt.Println("") + fmt.Println("Recieved a unlisted error.") + fmt.Println("") } -} \ No newline at end of file +}