(httpClient *http.Client, hostname string, u safeurl.SafeURL)
| 74 | } |
| 75 | |
| 76 | func getUserKeys(httpClient *http.Client, hostname string, u safeurl.SafeURL) ([]sshKey, error) { |
| 77 | var keys []sshKey |
| 78 | // TODO(api-client-rollout) |
| 79 | // This line of code is part of a mechanical roll out of the api client. |
| 80 | // As a follow up, consider whether the api client can be injected to this call site, rather than constructed |
| 81 | err := api.NewClientFromHTTP(httpClient).REST(hostname, http.MethodGet, u.String(), nil, &keys) |
| 82 | if err != nil { |
| 83 | return nil, err |
| 84 | } |
| 85 | |
| 86 | return keys, nil |
| 87 | } |
no test coverage detected