This repository was archived by the owner on Oct 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
No examples of connecting client to a node in READMEΒ #110
Copy link
Copy link
Open
Labels
effort/hoursEstimated to take one or several hoursEstimated to take one or several hoursexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuestatus/readyReady to be workedReady to be workedtopic/docsDocumentationDocumentation
Description
Hi, there is currently no example of how to connect this client to an ipfs node within the README here or within the godocs. Is it possible this can be added? Something similar to what is provided for go-ipfs-api.
package main
import (
"fmt"
"strings"
"os"
shell "github.com/ipfs/go-ipfs-api"
)
func main() {
// Where your local node is running on localhost:5001
sh := shell.NewShell("localhost:5001")
cid, err := sh.Add(strings.NewReader("hello world!"))
if err != nil {
fmt.Fprintf(os.Stderr, "error: %s", err)
os.Exit(1)
}
fmt.Printf("added %s", cid)
}
That would be very helpful for new users to this library. For context, I am doing some testing against remote Infura IPFS nodes to ensure the supported methods function as expected.
Thanks!
treasersimplifies, jaracil, penglonghua, tarrencev, charmitro and 3 more
Metadata
Metadata
Assignees
Labels
effort/hoursEstimated to take one or several hoursEstimated to take one or several hoursexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuestatus/readyReady to be workedReady to be workedtopic/docsDocumentationDocumentation