(t *testing.T)
| 396 | } |
| 397 | |
| 398 | func TestBuildQueryString(t *testing.T) { |
| 399 | defer func() { |
| 400 | if r := recover(); r == nil { |
| 401 | t.Error("wanted panic for odd-number of key-value parameters") |
| 402 | } |
| 403 | }() |
| 404 | |
| 405 | // staticcheck impressively catches buildQueryString calls that have an |
| 406 | // odd number of parameters. Build the slice in a convoluted way to |
| 407 | // throw it off and suppress the warning (gopls doesn't have nolint |
| 408 | // directives). |
| 409 | var elems []string |
| 410 | elems = append(elems, "1") |
| 411 | appendQueryString(nil, elems...) |
| 412 | } |
nothing calls this directly
no test coverage detected