Skip to content

bgv/redisurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redisurl

Parses a Redis url and returns result as a struct Build Status

Installation

Install redisurl using the "go get" command:

$ go get github.com/bgv/redisurl

The Go distribution is redisurl's only dependency.

Usage

Import github.com/bgv/redisurl and use as:

url, err := redisurl.Parse("redis://:v3rys3cr37@127.0.0.1:6379/5")
if err != nil {
	log.Fatal(err)
}

which will return the following struct

// Redis Info:
url.Host: 127.0.0.1
url.Port: 6379
url.Password: v3rys3cr37
url.Db: 5
url.Hostname: 127.0.0.1:6379

License

The LICENSE

About

Redis url parser in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages