Skip to content

provide simpler core.IPFSNode constructor #658

@btc

Description

@btc

This is a common operation. We should provide a simple alias for it.

    // ~/.go-ipfs
    // IPFS_PATH
    ipfsPath, err := fsrepo.BestKnownPath()
    if err != nil {
        return err
    }
    repo := fsrepo.At(ipfsPath)
    if err := repo.Open(); err != nil {
        return nil
    }

    node, err := core.NewIPFSNode(context.Background(), core.Offline(repo))
    if err != nil {
        return err
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions