ipld / ipld/go-car

CAR walk: decouple logic between getting the links and processing them

Open
#45 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.