Skip to content

Commit bddface

Browse files
committed
plugin: clear up the parameters definition for InstallPlugins
1 parent 2ac0f35 commit bddface

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

plugin.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ package docker
66

77
import (
88
"encoding/json"
9-
ioutil "io/ioutil"
9+
"io/ioutil"
1010
"net/http"
11-
"net/url"
1211

1312
"golang.org/x/net/context"
1413
)
@@ -37,12 +36,7 @@ type InstallPluginOptions struct {
3736
//
3837
// See https://goo.gl/C4t7Tz for more details.
3938
func (c *Client) InstallPlugins(opts InstallPluginOptions) error {
40-
params := make(url.Values)
41-
params.Set("remote", opts.Remote)
42-
if opts.Name != "" {
43-
params.Set("name", opts.Name)
44-
}
45-
path := "/plugins/pull?" + queryString(params)
39+
path := "/plugins/pull?" + queryString(opts)
4640
resp, err := c.do("POST", path, doOptions{
4741
data: opts.Plugins,
4842
context: opts.Context,

0 commit comments

Comments
 (0)