(client *http.Client, host string, selectedReposURL safeurl.SafeURL)
| 335 | } |
| 336 | |
| 337 | func selectedRepositoryCount(client *http.Client, host string, selectedReposURL safeurl.SafeURL) (int, error) { |
| 338 | apiClient := api.NewClientFromHTTP(client) |
| 339 | response := struct { |
| 340 | TotalCount int `json:"total_count"` |
| 341 | }{} |
| 342 | if err := apiClient.REST(host, "GET", selectedReposURL.String(), nil, &response); err != nil { |
| 343 | return 0, err |
| 344 | } |
| 345 | return response.TotalCount, nil |
| 346 | } |
no test coverage detected