mirror of
https://codeberg.org/ultimateplayer1999/go-api-usage.git
synced 2024-11-21 23:18:22 -05:00
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
Block a user