Compare commits

..

4 Commits

4 changed files with 17 additions and 6 deletions

BIN
keystatus

Binary file not shown.

View File

@ -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("")
}
}

BIN
newkey

Binary file not shown.

View File

@ -14,7 +14,7 @@ import (
type Response struct {
Action string `json:"action"`
Completed string `json:"completed"`
NewAPIKey int `json:"newAPIKey"`
NewAPIKey string `json:"newAPIKey"`
}
func main() {