(opts *LoginOptions)
| 245 | } |
| 246 | |
| 247 | func promptForHostname(opts *LoginOptions) (string, error) { |
| 248 | options := []string{"GitHub.com", "Other"} |
| 249 | hostType, err := opts.Prompter.Select( |
| 250 | "Where do you use GitHub?", |
| 251 | options[0], |
| 252 | options) |
| 253 | if err != nil { |
| 254 | return "", err |
| 255 | } |
| 256 | |
| 257 | isGitHubDotCom := hostType == 0 |
| 258 | if isGitHubDotCom { |
| 259 | return ghinstance.Default(), nil |
| 260 | } |
| 261 | |
| 262 | return opts.Prompter.InputHostname() |
| 263 | } |