mirror of
https://codeberg.org/ultimateplayer1999/go-api-usage.git
synced 2024-11-22 04:28: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 fulldate: ", r.KeyexpireString)
|
||||||
fmt.Println("Key expire date: ", r.ExpireDate)
|
fmt.Println("Key expire date: ", r.ExpireDate)
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
} else {
|
} else if resp.StatusCode == http.StatusUnauthorized {
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
fmt.Println("Key status: Expired")
|
fmt.Println("Key status: Expired")
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
|
} else {
|
||||||
|
fmt.Println("")
|
||||||
|
fmt.Println("Recieved a unlisted error.")
|
||||||
|
fmt.Println("")
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user