(factory *cmdutil.Factory)
| 56 | } |
| 57 | |
| 58 | func NewFinder(factory *cmdutil.Factory) PRFinder { |
| 59 | if finderForRunCommandStyleTests != nil { |
| 60 | f := finderForRunCommandStyleTests |
| 61 | finderForRunCommandStyleTests = &mockFinder{err: errors.New("you must use StubFinderForRunCommandStyleTests to stub PR lookups")} |
| 62 | return f |
| 63 | } |
| 64 | |
| 65 | return &finder{ |
| 66 | baseRepoFn: factory.BaseRepo, |
| 67 | branchFn: factory.Branch, |
| 68 | httpClient: factory.HttpClient, |
| 69 | gitConfigClient: factory.GitClient, |
| 70 | remotesFn: factory.Remotes, |
| 71 | progress: factory.IOStreams, |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | var finderForRunCommandStyleTests PRFinder |
| 76 |
no outgoing calls