Changed keystatus to directly tell you the status of the token.

This commit is contained in:
ultimateplayer1999 2023-01-18 13:31:46 +01:00
parent 99f5658469
commit 754585842a
Signed by: ultimateplayer1999
GPG Key ID: 690D4E43F8B51E51
2 changed files with 11 additions and 4 deletions

BIN
keystatus

Binary file not shown.

View File

@ -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("")
}
}