mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-15 11:13:37 +08:00

- Modified Godeps/Godeps.json by hand - [TEST] Updated welcome docs hash to sharness - [TEST] Updated contact doc - [TEST] disabled breaking test (t0080-repo refs local)
19 lines
391 B
Go
19 lines
391 B
Go
package coreunix
|
|
|
|
import (
|
|
"io"
|
|
|
|
core "github.com/ipfs/go-ipfs/core"
|
|
path "github.com/ipfs/go-ipfs/path"
|
|
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
|
)
|
|
|
|
func Cat(n *core.IpfsNode, pstr string) (io.Reader, error) {
|
|
p := path.FromString(pstr)
|
|
dagNode, err := n.Resolver.ResolvePath(p)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return uio.NewDagReader(n.ContextGroup.Context(), dagNode, n.DAG)
|
|
}
|