Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Go Programming Cookbook

You're reading from   Go Programming Cookbook Over 85 recipes to build modular, readable, and testable Golang applications across various domains

Arrow left icon
Product type Paperback
Published in Jul 2019
Publisher Packt
ISBN-13 9781789800982
Length 434 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Aaron Torres Aaron Torres
Author Profile Icon Aaron Torres
Aaron Torres
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. I/O and Filesystems FREE CHAPTER 2. Command-Line Tools 3. Data Conversion and Composition 4. Error Handling in Go 5. Network Programming 6. All about Databases and Storage 7. Web Clients and APIs 8. Microservices for Applications in Go 9. Testing Go Code 10. Parallelism and Concurrency 11. Distributed Systems 12. Reactive Programming and Data Streams 13. Serverless Programming 14. Performance Improvements, Tips, and Tricks 15. Other Books You May Enjoy

Working with Redis

Sometimes you need persistent storage or additional functionality provided by third-party libraries and services. This recipe will explore Redis as a form of non-relational data storage and showcase how a language such as Go can interact with these third-party services.

Since Redis supports key-value storage with a simple interface, it's an excellent candidate for session storage or temporary data that has a duration. The ability to specify a timeout on data stored in Redis is extremely valuable. This recipe will explore basic Redis usage from configuration, to querying, to using custom sorting.

Getting ready

Configure your environment according to these steps:

  1. Download and install Go 1.11.1 or above on youroperatingsystem fromhttps://golang.org/doc/install.
  2. Install Consul from https://www.consul.io/intro/getting-started/install.html.
  3. Open a Terminal or console application and create and navigate...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime