{"id":50703,"library":"go-redis-redis-v7","title":"go-redis v7","description":"Package redis implements a Redis client for Go.","status":"active","version":"7.4.1","language":"go","source_language":null,"source_url":"https://github.com/go-redis/redis","tags":["redis","client","cache","database"],"install":[{"cmd":"go get github.com/go-redis/redis/v7","lang":"bash","label":"Install github.com/go-redis/redis/v7"}],"dependencies":[],"imports":[{"symbol":"redis","correct":"github.com/go-redis/redis/v7"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/go-redis/redis/v7\"\n)\n\nfunc main() {\n\tclient := redis.NewClient(&redis.Options{Addr: \"localhost:6379\"})\n\terr := client.Set(context.Background(), \"key\", \"value\", 0).Err()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tval, err := client.Get(context.Background(), \"key\").Result()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"key\", val)\n}","lang":"go","description":"Connects to Redis, sets and gets a key."},"warnings":[{"fix":"Update import to github.com/go-redis/redis/v8 or later.","message":"v7 is outdated; consider upgrading to v8 or v9 for new features and security fixes.","severity":"gotcha","affected_versions":">=7.0.0 <8.0.0"}],"env_vars":null,"search_vec":"'cach':15 'client':10,14 'databas':16 'go':2,12 'go-redi':1 'implement':7 'packag':5 'redi':3,6,9,13 'v7':4","created_at":"2026-06-15T05:05:32.033599+00:00","updated_at":"2026-06-15T05:05:32.033599+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/go-redis/redis","github":"https://github.com/go-redis/redis","docs":"https://pkg.go.dev/github.com/go-redis/redis/v7#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}