MCPcopy
hub / github.com/perkeep/perkeep / RunCommand

Method RunCommand

cmd/pk/index.go:57–72  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

55}
56
57func (c *indexCmd) RunCommand(args []string) error {
58 dc := c.discoClient()
59 syncHandlers, err := dc.SyncHandlers()
60 if err != nil {
61 return fmt.Errorf("sync handlers discovery failed: %v", err)
62 }
63
64 for _, sh := range syncHandlers {
65 if sh.ToIndex {
66 if err := c.sync(sh.From, sh.To); err != nil {
67 return fmt.Errorf("Error while indexing from %v to %v: %v", sh.From, sh.To, err)
68 }
69 }
70 }
71 return nil
72}
73
74func (c *indexCmd) sync(from, to string) error {
75 return (&syncCmd{

Callers

nothing calls this directly

Calls 3

discoClientMethod · 0.95
syncMethod · 0.95
SyncHandlersMethod · 0.80

Tested by

no test coverage detected