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

Function Run

pkg/cmd/application/selectapp/select.go:76–86  ·  view source on GitHub ↗

Run executes the interactive application-selection flow and returns the chosen application. Other commands (e.g. open) use it to ensure an application is selected before proceeding. A nil application is returned when the account has no applications.

(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

74// application is selected before proceeding. A nil application is returned
75// when the account has no applications.
76func Run(f *cmdutil.Factory) (*dashboard.Application, error) {
77 opts := &SelectOptions{
78 IO: f.IOStreams,
79 Config: f.Config,
80 NewDashboardClient: func(clientID string) *dashboard.Client {
81 return dashboard.NewClient(clientID)
82 },
83 }
84
85 return runSelectCmd(opts)
86}
87
88func runSelectCmd(opts *SelectOptions) (*dashboard.Application, error) {
89 cs := opts.IO.ColorScheme()

Callers 1

NewOpenCmdFunction · 0.92

Calls 2

NewClientFunction · 0.92
runSelectCmdFunction · 0.85

Tested by

no test coverage detected