MCPcopy Create free account
hub / github.com/dim-an/cod / updateMain

Function updateMain

commands.go:401–426  ·  view source on GitHub ↗
(selectors []string)

Source from the content-addressed store, hash-verified

399}
400
401func updateMain(selectors []string) {
402 app := NewApplication()
403 defer app.Close()
404
405 req := server.ListCommandsRequest{
406 Selectors: selectors,
407 }
408 rsp := server.ListCommandsResponse{}
409 err := app.Client().Request(&req, &rsp)
410 verifyFatal(err)
411
412 sort.Sort(byApplication(rsp.CommandItems))
413
414 for _, item := range rsp.CommandItems {
415 if item.Command == nil {
416 continue
417 }
418 req := server.UpdateHelpPageRequest{
419 Id: item.Id,
420 Command: *item.Command,
421 }
422 rsp := server.UpdateHelpPageResponse{}
423 err = app.Client().Request(&req, &rsp)
424 verifyFatal(err)
425 }
426}
427
428func exampleConfigMain(createConfig bool) {
429 if !createConfig {

Callers 1

mainFunction · 0.85

Calls 6

CloseMethod · 0.95
ClientMethod · 0.95
NewApplicationFunction · 0.85
verifyFatalFunction · 0.85
byApplicationTypeAlias · 0.85
RequestMethod · 0.80

Tested by

no test coverage detected