Browse Source

client: s/v2URL/v2KeysURL/

Brian Waldon 11 years ago
parent
commit
a85a47c8f9
2 changed files with 5 additions and 5 deletions
  1. 4 4
      client/http.go
  2. 1 1
      client/http_test.go

+ 4 - 4
client/http.go

@@ -192,7 +192,7 @@ func (hw *httpWatcher) Next() (*Response, error) {
 	return resp, nil
 }
 
-func v2URL(ep url.URL, key string) *url.URL {
+func v2KeysURL(ep url.URL, key string) *url.URL {
 	ep.Path = path.Join(ep.Path, DefaultV2KeysPrefix, key)
 	return &ep
 }
@@ -207,7 +207,7 @@ type getAction struct {
 }
 
 func (g *getAction) httpRequest(ep url.URL) *http.Request {
-	u := v2URL(ep, g.Key)
+	u := v2KeysURL(ep, g.Key)
 
 	params := u.Query()
 	params.Set("recursive", strconv.FormatBool(g.Recursive))
@@ -224,7 +224,7 @@ type waitAction struct {
 }
 
 func (w *waitAction) httpRequest(ep url.URL) *http.Request {
-	u := v2URL(ep, w.Key)
+	u := v2KeysURL(ep, w.Key)
 
 	params := u.Query()
 	params.Set("wait", "true")
@@ -243,7 +243,7 @@ type createAction struct {
 }
 
 func (c *createAction) httpRequest(ep url.URL) *http.Request {
-	u := v2URL(ep, c.Key)
+	u := v2KeysURL(ep, c.Key)
 
 	params := u.Query()
 	params.Set("prevExist", "false")

+ 1 - 1
client/http_test.go

@@ -73,7 +73,7 @@ func TestV2URLHelper(t *testing.T) {
 	}
 
 	for i, tt := range tests {
-		got := v2URL(tt.endpoint, tt.key)
+		got := v2KeysURL(tt.endpoint, tt.key)
 		if tt.want != *got {
 			t.Errorf("#%d: want=%#v, got=%#v", i, tt.want, *got)
 		}