Use CoreAPI within `Unixfs().Get()`
Opened this issue · 2 comments
Currently, this directly invokes the ls
HTTP API endpoint but that means we need to duplicate some logic. It would be nice if we could just call Unixfs().Ls()
and use that.
Hello @Stebalien
I'm so exciting to work with IPFS
I'm trying to find what this issue about
I found that we are able to use Unixfs().Get()
normally as you can find in this Gist
https://gist.github.com/tarekbadrshalaan/3efa2d69d169d00dc5d717e9afa1b284#file-use_go-ipfs-http-client-go-L24
so please try to explain more and I will work on it.
This issue is about refactoring Unixfs().Get()
to use Unixfs().Ls()
instead of manually calling ls
:
go-ipfs-http-client/apifile.go
Lines 228 to 231 in 6062f4d
That way, we don't need to re-implement decoding ls here:
go-ipfs-http-client/apifile.go
Lines 147 to 196 in 6062f4d