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

Function removeMain

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

Source from the content-addressed store, hash-verified

373}
374
375func removeMain(selectors []string) {
376 app := NewApplication()
377 defer app.Close()
378
379 var ids []int64
380 {
381 req := server.ListCommandsRequest{
382 Selectors: selectors,
383 }
384 rsp := server.ListCommandsResponse{}
385 err := app.Client().Request(&req, &rsp)
386 verifyFatal(err)
387 for idx := range rsp.CommandItems {
388 ids = append(ids, rsp.CommandItems[idx].Id)
389 }
390 }
391
392 {
393 req := server.RemoveCommandsRequest{}
394 req.HelpPageIds = ids
395 rsp := server.RemoveCommandsResponse{}
396 err := app.Client().Request(&req, &rsp)
397 verifyFatal(err)
398 }
399}
400
401func updateMain(selectors []string) {
402 app := NewApplication()

Callers 1

mainFunction · 0.85

Calls 5

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

Tested by

no test coverage detected