Find tutorials, examples and technical articles that will help you to develop with Redis and Golang.
redigo library is located in the
https://github.com/gomodule/redigo that you must import in your application.
Step 1. Import the
Find more information about Golang & Redis connections in the "Redis Connect".
Go-redis is a type-safe, Redis client library for Go with support for features like Pub/Sub, sentinel, and pipelining.It is a Redis client able to support a Redis cluster and is designed to store and update slot info automatically with a cluster change. Below are the attractive features of Go-redis:
- Go-redis has pooling capabilities.(Pools allow you to safely handle go-routines, auto reconnect if any error occurs)
- It supports both standard, OSS cluster AIP, and Sentinel
- Comes with Auto reconnects / Auto-rediscovers cluster slots on error/migration
- Support instrumentations
- Allows for a custom dialer (this is useful for Enterprise)
The go-redis library is located in the https://github.com/go-redis/redis that you must import in your application.
Let us create a main.go file and write the following code to check for your connection
By now, the Go application should successfully connect to the Redis instance and return a successful PONG response.
Redis Launchpad is like an “App Store” for Redis sample apps. You can easily find apps for your preferred frameworks and languages. Below are few of these apps. Click here to access the complete lists of apps