Skip to content

Commit 409cd9c

Browse files
authored
Fixing Has() issue due to go version
1 parent 7779786 commit 409cd9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/codespaces/api/api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ func TestListCodespaces(t *testing.T) {
2828
}
2929

3030
page := 1
31-
if r.URL.Query().Has("page") {
32-
page, _ = strconv.Atoi(r.URL.Query()["page"][0])
31+
if r.URL.Query().Get("page") != "" {
32+
page, _ = strconv.Atoi(r.URL.Query().Get("page"))
3333
}
3434

3535
per_page := 0
36-
if r.URL.Query().Has("per_page") {
37-
per_page, _ = strconv.Atoi(r.URL.Query()["per_page"][0])
36+
if r.URL.Query().Get("per_page") != "" {
37+
per_page, _ = strconv.Atoi(r.URL.Query().Get("per_page"))
3838
}
3939

4040
codespaces := []*Codespace{}

0 commit comments

Comments
 (0)