https://github.com/betterstack-community/go-redis
Examples for using Redis in Go programs
https://github.com/betterstack-community/go-redis
Last synced: 27 days ago
JSON representation
Examples for using Redis in Go programs
- Host: GitHub
- URL: https://github.com/betterstack-community/go-redis
- Owner: betterstack-community
- License: apache-2.0
- Created: 2023-08-09T11:38:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-09T11:44:37.000Z (almost 3 years ago)
- Last Synced: 2025-03-03T11:17:32.079Z (about 1 year ago)
- Language: Go
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Using Redis in Go
This repo contains various examples of using Redis in Go. You'll learn how to
perform the following actions:
- Connect to a Redis server from your Go program.
- Add data to a Redis database.
- Read previously cached data in the database.
- Update a cached value.
- Delete a cached value.
**Tutorial**:
[Redis Caching in Go: A Beginner's Guide](https://betterstack.com/community/guides/scaling-go/redis-in-go/).
## 🟢 Prerequisites
- [A recent version of Go](https://go.dev/doc/install). All examples were tested
with Go v1.21.
- [A recent version of Redis](https://redis.io/docs/getting-started/installation/).
## 📦 Getting started
- Clone this repository to your computer and `cd` into it:
```bash
git clone https://github.com/betterstack-community/go-redis.git
cd go-redis/
```
- Install the required dependencies:
```bash
go mod download
```
- Follow along with the
[tutorial](https://betterstack.com/community/guides/scaling-go/redis-in-go/).
## âš– License
The code used in this project and in the linked tutorial are licensed under the
[Apache License, Version 2.0](LICENSE).