-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid use of pb.Data
#5217
Comments
@schomatis can i help you do for it? |
Yes, go ahead! |
@overbool After ipfs/go-unixfs#17 you could do a similar replacement process for |
Offhand this sounds like a good idea. But I would need to see the P.R. before I am able to give any opinion. Refactors like this are hard for me to visualize without just doing it. Also a p.r. makes sure we don't miss any corner cases. |
License: MIT Signed-off-by: Overbool <[email protected]>
License: MIT Signed-off-by: Overbool <[email protected]>
License: MIT Signed-off-by: Overbool <[email protected]>
fix(unixfs): issue #5217 (Avoid use of `pb.Data`)
Avoid direct manipulation of the UnixFS format (
pb.Data
) and use theFSNode
abstraction instead.Replacing all
FromBytes()
calls (and removing the function itself),https://github.com/ipfs/go-ipfs/blob/a9efa7e201707bd1a0d48fe1146a76ec0097db92/unixfs/unixfs.go#L32-L40
with
FSNodeFromBytes()
should be a good first step,https://github.com/ipfs/go-ipfs/blob/a9efa7e201707bd1a0d48fe1146a76ec0097db92/unixfs/unixfs.go#L153-L162
The text was updated successfully, but these errors were encountered: