Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
package ipfs
import (
coreiface "gx/ipfs/QmNUCLv5fmUBuAcwbkt58NQvMcJgd5FPCYV2yNCXq4Wnd6/go-ipfs/core/coreapi/interface"
type Command struct {
Node *node.Node
func (c *Command) Add(content io.Reader) (coreiface.Path, error) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
path, err := coreapi.NewCoreAPI(c.Node.IpfsNode).Unixfs().Add(ctx, content)
if err != nil {
return nil, err
return path, nil