Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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