diff --git a/keystatus b/keystatus index 1fbf578..885a911 100755 Binary files a/keystatus and b/keystatus differ diff --git a/keystatus.go b/keystatus.go index 322ec8e..2926a8d 100644 --- a/keystatus.go +++ b/keystatus.go @@ -61,8 +61,15 @@ func main() { } // Print the response - fmt.Println("") - fmt.Println("Key expire fulldate: ", r.KeyexpireString) - fmt.Println("Key expire date: ", r.ExpireDate) - fmt.Println("") + 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 { + fmt.Println("") + fmt.Println("Key status: Expired") + fmt.Println("") + } } \ No newline at end of file