Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- todoID, incrErr := client.Incr(todoIDCounterName).Result()
- todoInfo := make(map[string]interface{})
- todoInfo["todoid"] = todoID
- todoInfo["title"] = todoTitle
- todoInfo["completed"] = "false"
- txPipe := client.TxPipeline()
- hmsetResult := txPipe.HMSet(todoHashNamePrefix+strconv.Itoa(int(todoID)), todoInfo)
- lpushResult := txPipe.LPush(pendingTodosListName, strconv.Itoa(int(todoID)))
- _, execErr := txPipe.Exec()
- ...
Add Comment
Please, Sign In to add comment