Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created January 22, 2020 22: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/b76d2461e79caedfbab20aa10b1ea7c3 to your computer and use it in GitHub Desktop.
Save vasa-develop/b76d2461e79caedfbab20aa10b1ea7c3 to your computer and use it in GitHub Desktop.
SimpleAsWater Tutorial: Hands On IPLD Tutorial: PART 2
// GetDocument handles READ operations of a DAG entry by CID, returning the corresponding document
func GetDocument(ref, key string) (out SampleStruct, err error) {
err = sh.DagGet(ref+"/"+key, &out)
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment