MCPcopy Create free account
hub / github.com/algolia/cli / New

Function New

pkg/cmd/factory/default.go:19–30  ·  view source on GitHub ↗
(appVersion string, cfg config.IConfig)

Source from the content-addressed store, hash-verified

17)
18
19func New(appVersion string, cfg config.IConfig) *cmdutil.Factory {
20 f := &cmdutil.Factory{
21 Config: cfg,
22 ExecutableName: "gh",
23 }
24 f.IOStreams = ioStreams(f)
25 f.SearchClient = searchClient(f, appVersion)
26 f.CrawlerClient = crawlerClient(f)
27 f.CompositionClient = compositionClient(f, appVersion)
28
29 return f
30}
31
32func ioStreams(_ *cmdutil.Factory) *iostreams.IOStreams {
33 io := iostreams.System()

Callers 1

ExecuteFunction · 0.92

Calls 4

ioStreamsFunction · 0.85
searchClientFunction · 0.85
crawlerClientFunction · 0.85
compositionClientFunction · 0.85

Tested by

no test coverage detected