Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created January 4, 2020 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasa-develop/ff8e3f4af4020cbba82df27725e485a7 to your computer and use it in GitHub Desktop.
Save vasa-develop/ff8e3f4af4020cbba82df27725e485a7 to your computer and use it in GitHub Desktop.
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