Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created January 22, 2020 22:10
Show Gist options
  • Save vasa-develop/937e86f3a17f156c8641c24adf9cc241 to your computer and use it in GitHub Desktop.
Save vasa-develop/937e86f3a17f156c8641c24adf9cc241 to your computer and use it in GitHub Desktop.
SimpleAsWater Tutorial: Hands On IPLD Tutorial: PART 2
// Fetch the details by reading the DAG for key "inputKey"
fmt.Printf("READ: Reading the document details of employee by ID: \"%s\"\n", inputID)
start = time.Now()
document, err := GetDocument(cid, inputID)
elapsed = time.Since(start)
if err != nil {
fmt.Println(err)
}
fmt.Printf("READ: Salary of employee ID %s is %s\n", string(inputID), string(document.Salary))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment