dzhus/snaplet-redis — pull request #10 by dbp (2014-09-19 03:25:05+00:00)
Title: allow port to be a unix socket (as hedis allows) in cfg file

It's convenient to be able to connect to redis over a unix socket. Hedis supports this, and so if you call `initRedisDB` with a constructed config, you can do this, but the way that `initRedisDBConf` parses the config, it doesn't work.

This change allows the following:

```
...
port = 3456
```
or
```
...
port = "/var/run/redis/redis.sock"
```

It's a little odd to go into "port" but that's how the network library works (and it's even odder that you still pass a "host" in - it's just ignored if the port is a UnixSocket), so I don't see a strong reason to change it.