MCPcopy
hub / github.com/cli/cli / Searcher

Function Searcher

pkg/cmd/search/shared/shared.go:41–56  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

39}
40
41func Searcher(f *cmdutil.Factory) (search.Searcher, error) {
42 cfg, err := f.Config()
43 if err != nil {
44 return nil, err
45 }
46
47 host, _ := cfg.Authentication().DefaultHost()
48 client, err := f.HttpClient()
49 if err != nil {
50 return nil, err
51 }
52
53 detector := fd.NewDetector(client, host)
54
55 return search.NewSearcher(client, host, detector), nil
56}
57
58func SearchIssues(opts *IssuesOptions) error {
59 io := opts.IO

Callers 6

NewCmdCommitsFunction · 0.92
NewCmdPrsFunction · 0.92
NewCmdIssuesFunction · 0.92
NewCmdReposFunction · 0.92
NewCmdCodeFunction · 0.92
TestSearcherFunction · 0.70

Calls 4

NewSearcherFunction · 0.92
ConfigMethod · 0.65
DefaultHostMethod · 0.65
AuthenticationMethod · 0.65

Tested by 1

TestSearcherFunction · 0.56