(httpClient *http.Client, hostname, token string)
| 135 | } |
| 136 | |
| 137 | func getViewer(httpClient *http.Client, hostname, token string) (string, error) { |
| 138 | authedClient := *httpClient |
| 139 | authedClient.Transport = api.AddAuthTokenHeader(httpClient.Transport, cfg{token: token}) |
| 140 | return api.CurrentLoginName(api.NewClientFromHTTP(&authedClient), hostname) |
| 141 | } |
| 142 | |
| 143 | func waitForEnter(r io.Reader) error { |
| 144 | scanner := bufio.NewScanner(r) |