Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SimpleAsWater: Hands-on IPLD Tutorial in Golang
// Dag PUT operation which will return the CID for futher access or pinning etc.
cid, err := sh.DagPut(entryJSON, "json", "cbor")
if err != nil {
fmt.Fprintf(os.Stderr, "error: %s", err)
os.Exit(1)
}
fmt.Println("------\nOUTPUT\n------")
fmt.Printf("WRITE: Successfully added %sHere's the IPLD Explorer link: https://explore.ipld.io/#/explore/%s \n", string(cid+"\n"), string(cid+"\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment