Fixing Has() issue due to go version

This commit is contained in:
Gabriel Ramírez 2021-10-05 18:49:41 +00:00 committed by GitHub
parent 777978644c
commit 409cd9c388
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,13 +28,13 @@ func TestListCodespaces(t *testing.T) {
}
page := 1
if r.URL.Query().Has("page") {
page, _ = strconv.Atoi(r.URL.Query()["page"][0])
if r.URL.Query().Get("page") != "" {
page, _ = strconv.Atoi(r.URL.Query().Get("page"))
}
per_page := 0
if r.URL.Query().Has("per_page") {
per_page, _ = strconv.Atoi(r.URL.Query()["per_page"][0])
if r.URL.Query().Get("per_page") != "" {
per_page, _ = strconv.Atoi(r.URL.Query().Get("per_page"))
}
codespaces := []*Codespace{}