mirror of
https://codeberg.org/ultimateplayer1999/go-api-usage.git
synced 2024-11-21 17:28:20 -05:00
Changed keystatus to directly tell you the status of the token.
This commit is contained in:
parent
99f5658469
commit
754585842a
15
keystatus.go
15
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("")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user