(httpClient *http.Client, hostname, token string)
| 124 | } |
| 125 | |
| 126 | func getViewer(httpClient *http.Client, hostname, token string) (string, error) { |
| 127 | authedClient := *httpClient |
| 128 | authedClient.Transport = api.AddAuthTokenHeader(httpClient.Transport, cfg{token: token}) |
| 129 | return api.CurrentLoginName(api.NewClientFromHTTP(&authedClient), hostname) |
| 130 | } |
| 131 | |
| 132 | func waitForEnter(r io.Reader) error { |
| 133 | scanner := bufio.NewScanner(r) |