(args []string)
| 55 | } |
| 56 | |
| 57 | func (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 | |
| 74 | func (c *indexCmd) sync(from, to string) error { |
| 75 | return (&syncCmd{ |
nothing calls this directly
no test coverage detected