From ebe32689d4b2e058bad84ca18e1a02ff5fc61a8c Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 23 Oct 2014 16:01:40 -0700 Subject: [PATCH] client: s/v2Prefix/DefaultV2KeysPrefix/ --- client/http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/http.go b/client/http.go index b19d1c67c..cad0ad682 100644 --- a/client/http.go +++ b/client/http.go @@ -31,8 +31,8 @@ import ( ) var ( - v2Prefix = "/v2/keys" - ErrTimeout = context.DeadlineExceeded + DefaultV2KeysPrefix = "/v2/keys" + ErrTimeout = context.DeadlineExceeded ) // transport mimics http.Transport to provide an interface which can be @@ -65,7 +65,7 @@ func NewHTTPClient(tr *http.Transport, ep string, timeout time.Duration) (*httpC } func (c *httpClient) SetPrefix(p string) { - v2Prefix = p + DefaultV2KeysPrefix = p } func (c *httpClient) Create(key, val string, ttl time.Duration) (*Response, error) { @@ -193,7 +193,7 @@ func (hw *httpWatcher) Next() (*Response, error) { } func v2URL(ep url.URL, key string) *url.URL { - ep.Path = path.Join(ep.Path, v2Prefix, key) + ep.Path = path.Join(ep.Path, DefaultV2KeysPrefix, key) return &ep }