vektra/consul_kv_cache — pull request #1 by betawaffle (2014-12-13 16:39:39+00:00)
Title: Use Official Consul API Package

This is in support of vektra/vega/issues/4.

Includes:
- Add (backward-compatible) support for a custom consul client config (i.e. token, hostname, port, etc.)
- Move the set/del helpers onto the `ConsulKVCache` object
- Update the tests
- Pull `prefix` accesses and variable declarations out of locked regions. `prefix` never changes and so does not need to be in the locked regions.
- Update whitespace to be more in-line with what I perceive as common go convention. @evanphx Am I wrong to do this?

A couple potential sticking points we should discuss:
- I created a new function to try and keep backward-compatibility, but I'm not sure about the name (`NewCustomConsulKVCache`). Can you think of a better name?
- I made some whitespace changes which I think makes the code more readable, but you may disagree. You can evaluate them by looking at just the second commit (d494f33).