(ctx context.Context, source model.PathSyncSource, jsonFile string)
| 344 | } |
| 345 | |
| 346 | func (s *Sync) walkToJSON(ctx context.Context, source model.PathSyncSource, jsonFile string) error { |
| 347 | |
| 348 | db := memory.NewMemDB() |
| 349 | if er := source.Walk(ctx, func(path string, node tree.N, err error) error { |
| 350 | |
| 351 | return db.CreateNode(ctx, node, false) |
| 352 | |
| 353 | }, "/", true); er != nil { |
| 354 | return er |
| 355 | } |
| 356 | |
| 357 | return db.ToJSON(jsonFile) |
| 358 | |
| 359 | } |
| 360 | |
| 361 | func (s *Sync) statRoots(ctx context.Context, source model.Endpoint) (stat *model.EndpointRootStat, e error) { |
| 362 | stat = &model.EndpointRootStat{} |
no test coverage detected