Guest User

Untitled

a guest
Nov 14th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ...
  2. todoID, incrErr := client.Incr(todoIDCounterName).Result()
  3. todoInfo := make(map[string]interface{})
  4.  
  5. todoInfo["todoid"] = todoID
  6. todoInfo["title"] = todoTitle
  7. todoInfo["completed"] = "false"
  8.  
  9. txPipe := client.TxPipeline()
  10.  
  11. hmsetResult := txPipe.HMSet(todoHashNamePrefix+strconv.Itoa(int(todoID)), todoInfo)
  12. lpushResult := txPipe.LPush(pendingTodosListName, strconv.Itoa(int(todoID)))
  13.  
  14. _, execErr := txPipe.Exec()
  15. ...
Add Comment
Please, Sign In to add comment