(httpClient *http.Client, hostname, token string)
| 152 | } |
| 153 | |
| 154 | func getViewer(httpClient *http.Client, hostname, token string) (string, error) { |
| 155 | authedClient := *httpClient |
| 156 | authedClient.Transport = api.AddAuthTokenHeaderWithRefresh(httpClient.Transport, cfg{token: token}) |
| 157 | return api.CurrentLoginName(api.NewClientFromHTTP(&authedClient), hostname) |
| 158 | } |
| 159 | |
| 160 | func waitForEnter(r io.Reader) error { |
| 161 | scanner := bufio.NewScanner(r) |