Added additional checks for status codes in keystatus
This commit is contained in:
parent
754585842a
commit
571a1bc3a7
|
@ -67,9 +67,13 @@ func main() {
|
|||
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("")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue