{"id":15394279,"url":"https://github.com/xyproto/simpleredis","last_synced_at":"2025-04-07T10:29:31.991Z","repository":{"id":7841616,"uuid":"9213233","full_name":"xyproto/simpleredis","owner":"xyproto","description":":radio: Simple way to use Redis from Go","archived":false,"fork":false,"pushed_at":"2024-12-01T16:04:16.000Z","size":166,"stargazers_count":26,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T09:06:47.702Z","etag":null,"topics":["go","redis","strings"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["xyproto","barracks510"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2013-04-04T07:34:06.000Z","updated_at":"2025-02-15T18:55:21.000Z","dependencies_parsed_at":"2024-12-24T11:10:20.376Z","dependency_job_id":"51ed7a42-c497-4e0d-9b21-3c35edc019c8","html_url":"https://github.com/xyproto/simpleredis","commit_stats":{"total_commits":120,"total_committers":6,"mean_commits":20.0,"dds":"0.15000000000000002","last_synced_commit":"a3b46ce7cb8a37813b23b50d3f2e7a4cebb32112"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fsimpleredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/simpleredis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247635319,"owners_count":20970719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","redis","strings"],"created_at":"2024-10-01T15:22:58.062Z","updated_at":"2025-04-07T10:29:31.969Z","avatar_url":"https://github.com/xyproto.png","language":"Go","readme":"Simple Redis\n============\n\n[![GoDoc](https://godoc.org/github.com/xyproto/simpleredis?status.svg)](http://godoc.org/github.com/xyproto/simpleredis)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/simpleredis)](https://goreportcard.com/report/github.com/xyproto/simpleredis)\n\nEasy way to use Redis from Go.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/go:github-xyproto-simpleredis.svg)](https://repology.org/project/go:github-xyproto-simpleredis/versions)\n\nDependencies\n------------\n\nRequires Go 1.17 or later.\n\nOnline API Documentation\n------------------------\n\n[godoc.org](http://godoc.org/github.com/xyproto/simpleredis)\n\n\nFeatures and limitations\n------------------------\n\n* Supports simple use of lists, hashmaps, sets and key/values\n* Deals mainly with strings\n* Uses the [redigo](https://github.com/gomodule/redigo) package\n\n\nExample usage\n-------------\n\n~~~go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/xyproto/simpleredis/v2\"\n)\n\nfunc main() {\n    // Check if the redis service is up\n    if err := simpleredis.TestConnection(); err != nil {\n        log.Fatalln(\"Could not connect to Redis. Is the service up and running?\")\n    }\n\n    // For checking if a Redis server on a specific host:port is up.\n    // simpleredis.TestConnectionHost(\"localhost:6379\")\n\n    // Create a connection pool, connect to the given redis server\n    pool := simpleredis.NewConnectionPool()\n\n    // Use this for connecting to a different redis host/port\n    // pool := simpleredis.NewConnectionPoolHost(\"localhost:6379\")\n\n    // For connecting to a different redis host/port, with a password\n    // pool := simpleredis.NewConnectionPoolHost(\"password@redishost:6379\")\n\n    // Close the connection pool right after this function returns\n    defer pool.Close()\n\n    // Create a list named \"greetings\"\n    list := simpleredis.NewList(pool, \"greetings\")\n\n    // Add \"hello\" to the list, check if there are errors\n    if list.Add(\"hello\") != nil {\n        log.Fatalln(\"Could not add an item to list!\")\n    }\n\n    // Get the last item of the list\n    if item, err := list.GetLast(); err != nil {\n        log.Fatalln(\"Could not fetch the last item from the list!\")\n    } else {\n        log.Println(\"The value of the stored item is:\", item)\n    }\n\n    // Remove the list\n    if list.Remove() != nil {\n        log.Fatalln(\"Could not remove the list!\")\n    }\n}\n~~~\n\nTesting\n-------\n\nRedis must be up and running locally for the `go test` tests to work.\n\n\nTimeout issues\n--------------\n\nIf there are timeout issues when connecting to Redis, try consulting the Redis latency doctor on the server by running `redis-cli` and then `latency doctor`.\n\n\nVersion, license and author\n---------------------------\n\n* Version: 2.8.1\n* License: BSD-3\n* Author: Alexander F. Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n","funding_links":["https://github.com/sponsors/xyproto","https://github.com/sponsors/barracks510"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fsimpleredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fsimpleredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fsimpleredis/lists"}