Fixing Has() issue due to go version
This commit is contained in:
parent
777978644c
commit
409cd9c388
1 changed files with 4 additions and 4 deletions
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue