(client *http.Client, hostname string, prompter iprompter)
| 850 | } |
| 851 | |
| 852 | func interactiveGitIgnore(client *http.Client, hostname string, prompter iprompter) (string, error) { |
| 853 | confirmed, err := prompter.Confirm("Would you like to add a .gitignore?", false) |
| 854 | if err != nil { |
| 855 | return "", err |
| 856 | } else if !confirmed { |
| 857 | return "", nil |
| 858 | } |
| 859 | |
| 860 | templates, err := api.RepoGitIgnoreTemplates(client, hostname) |
| 861 | if err != nil { |
| 862 | return "", err |
| 863 | } |
| 864 | selected, err := prompter.Select("Choose a .gitignore template", "", templates) |
| 865 | if err != nil { |
| 866 | return "", err |
| 867 | } |
| 868 | return templates[selected], nil |
| 869 | } |
| 870 | |
| 871 | func interactiveLicense(client *http.Client, hostname string, prompter iprompter) (string, error) { |
| 872 | confirmed, err := prompter.Confirm("Would you like to add a license?", false) |
no test coverage detected