(httpClient *http.Client, repo ghrepo.Interface, p iprompter, dir string, allowFS bool, isPR bool)
| 142 | } |
| 143 | |
| 144 | func NewTemplateManager(httpClient *http.Client, repo ghrepo.Interface, p iprompter, dir string, allowFS bool, isPR bool) *templateManager { |
| 145 | cachedClient := api.NewCachedHTTPClient(httpClient, time.Hour*24) |
| 146 | return &templateManager{ |
| 147 | repo: repo, |
| 148 | rootDir: dir, |
| 149 | allowFS: allowFS, |
| 150 | isPR: isPR, |
| 151 | httpClient: httpClient, |
| 152 | prompter: p, |
| 153 | detector: fd.NewDetector(cachedClient, repo.RepoHost()), |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func (m *templateManager) hasAPI() (bool, error) { |
| 158 | if !m.isPR { |
no test coverage detected