Set default value for all Select prompts (#6131)

This commit is contained in:
Sam Coe 2022-08-24 09:10:38 +03:00 committed by GitHub
parent 9af193029b
commit 6955db471d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 18 deletions

View file

@ -187,13 +187,11 @@ func loginRun(opts *LoginOptions) error {
}
func promptForHostname(opts *LoginOptions) (string, error) {
options := []string{"GitHub.com", "GitHub Enterprise Server"}
hostType, err := opts.Prompter.Select(
"What account do you want to log into?",
"",
[]string{
"GitHub.com",
"GitHub Enterprise Server",
})
options[0],
options)
if err != nil {
return "", err
}