title: How to create Redis Transaction in Go using go-redis/redis package?
body: <p>I want to execute multiple redis commmand with transaction using <code>MULTI</code> and <code>EXEC</code>, so I can <code>DISCARD</code> it if something bad happens.</p>
  
  <p>I've looking for the example of how to do redis transaction using
  <a href="https://github.com/go-redis/redis" rel="noreferrer">go-redis/redis</a> package and found nothing.</p>
  
  <p>And I also look into the documentation <a href="https://godoc.org/gopkg.in/redis.v5" rel="noreferrer">here</a> and I got nothing related to how to do redis transaction <a href="https://redis.io/topics/transactions" rel="noreferrer">like this for example</a> using that package. Or maybe I missing something from the documentation because yeah you know that godoc is only explain every function in package mostly using one liner.</p>
  
  <p>Even though I found some example to do redis transaction using other Go Redis library, I won't modify my programs to use another library since the effort will be much larger to port whole application using another library.</p>
  
  <p>Can anyone help me to do that using go-redis/redis package?</p>