Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elcuervo/redisurl

Redis url parser
https://github.com/elcuervo/redisurl

Last synced: 30 days ago
JSON representation

Redis url parser

Awesome Lists containing this project

README

        

# redisurl

Parses a redis url and returns a struct with the result

```go
url = redisurl.Parse("redis://username:s3cr37@somewhere:6380/9")
// url.Port
// 6380
// url.Database
// 9
// url.Host
// somewhere
// url.Password
// s3cr37
```
You can also use `.Url` to get a Redis compatible string.