CAR walk: decouple logic between getting the links and processing them
Open
- Dominant language
- Go
- Stars
- 175
- Forks
- 54
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 4
Description
https://github.com/ipld/go-car/blob/a4380ef67a191a4e50a89a3e5dabb715cb798027/car.go#L58-L61
The `dag.Walk()` function receives a `GetLinks` callback to fetch the children of the parent node `r`. We overload that function with the processing itself of the node (in this case writing it to the file with `(*carWriter).enumGetLinks`). Although the `visit` callback in the same `dag.Walk` is also undocumented it seems a more appropriate place for that logic.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.