You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
As I understand from talking to @cpacia, the IPFS interface code in the ipfs folder was written "in the dark" (no documentation) from the IPFS command line tool and ended up being a dirty hack. For example, inside add.go the function AddFile calls the functions PreRun, Run and PostRun which are not relevant to adding files. As explained in this issue, there is a much neater way of doing things (see whyrusleeping's answer):
If someone wants to do that it's fine, but I think this is the only command that could be simplified that way. And doing so would make this function inconsistent with the rest of the IPFS package.
Why is Add is the only command that could be simplified? It seems to me that PreRun, Run and PostRun are just helper functions for the IPFS command line, which we are not using. Looking into coreunix, I see cat.go.
Because as far as I know add is the only one where you have a function like coreunix.add. If you can find others in the IPFS code to do the same thing for the other functions then that works.
As I understand from talking to @cpacia, the IPFS interface code in the
ipfs
folder was written "in the dark" (no documentation) from the IPFS command line tool and ended up being a dirty hack. For example, insideadd.go
the functionAddFile
calls the functionsPreRun
,Run
andPostRun
which are not relevant to adding files. As explained in this issue, there is a much neater way of doing things (see whyrusleeping's answer):instead of
The text was updated successfully, but these errors were encountered: