mirror of
https://codeberg.org/ultimateplayer1999/go-api-usage.git
synced 2025-07-15 10:49:44 -04:00
Compare commits
4 Commits
4faecc1444
...
main
Author | SHA1 | Date | |
---|---|---|---|
ace4c7e53f
|
|||
571a1bc3a7
|
|||
754585842a
|
|||
99f5658469
|
21
keystatus.go
21
keystatus.go
@ -61,8 +61,19 @@ 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 if resp.StatusCode == http.StatusUnauthorized {
|
||||
fmt.Println("")
|
||||
fmt.Println("Key status: Expired")
|
||||
fmt.Println("")
|
||||
} else {
|
||||
fmt.Println("")
|
||||
fmt.Println("Recieved an other status code.")
|
||||
fmt.Println("")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user