From 8711c6635d3199f07eef9d6880738e48cea70e02 Mon Sep 17 00:00:00 2001
From: Jeromy <jeromyj@gmail.com>
Date: Mon, 28 Dec 2015 05:47:33 -0800
Subject: [PATCH] make opt skip map a global

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
---
 commands/http/client.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/commands/http/client.go b/commands/http/client.go
index d1864fe30..44e32e02a 100644
--- a/commands/http/client.go
+++ b/commands/http/client.go
@@ -23,6 +23,10 @@ const (
 	ApiPath      = "/api/v0" // TODO: make configurable
 )
 
+var OptionSkipMap = map[string]bool{
+	"api": true,
+}
+
 // Client is the commands HTTP client interface.
 type Client interface {
 	Send(req cmds.Request) (cmds.Response, error)
@@ -141,13 +145,9 @@ func (c *client) Send(req cmds.Request) (cmds.Response, error) {
 }
 
 func getQuery(req cmds.Request) (string, error) {
-	// some options should be kept clientside, the server doesnt care
-	skip := map[string]bool{
-		"api": true,
-	}
 	query := url.Values{}
 	for k, v := range req.Options() {
-		if skip[k] {
+		if OptionSkipMap[k] {
 			continue
 		}
 		str := fmt.Sprintf("%v", v)