()
| 95 | } |
| 96 | |
| 97 | func getPassword() (string, error) { |
| 98 | if passwordFlag != "" { |
| 99 | return passwordFlag, nil |
| 100 | } |
| 101 | |
| 102 | var password string |
| 103 | if err := ui.PromptPassword("password", &password); err != nil { |
| 104 | return "", errors.Wrap(err, "getting password input") |
| 105 | } |
| 106 | if password == "" { |
| 107 | return "", errors.New("Password is empty") |
| 108 | } |
| 109 | |
| 110 | return password, nil |
| 111 | } |
| 112 | |
| 113 | func getBaseURL(rawURL string) (string, error) { |
| 114 | u, err := url.Parse(rawURL) |
no test coverage detected