Skip to content

Commit

Permalink
plugin: clear up the parameters definition for InstallPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Feb 12, 2018
1 parent 2ac0f35 commit bddface
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ package docker

import (
"encoding/json"
ioutil "io/ioutil"
"io/ioutil"
"net/http"
"net/url"

"golang.org/x/net/context"
)
Expand Down Expand Up @@ -37,12 +36,7 @@ type InstallPluginOptions struct {
//
// See https://goo.gl/C4t7Tz for more details.
func (c *Client) InstallPlugins(opts InstallPluginOptions) error {
params := make(url.Values)
params.Set("remote", opts.Remote)
if opts.Name != "" {
params.Set("name", opts.Name)
}
path := "/plugins/pull?" + queryString(params)
path := "/plugins/pull?" + queryString(opts)
resp, err := c.do("POST", path, doOptions{
data: opts.Plugins,
context: opts.Context,
Expand Down

0 comments on commit bddface

Please sign in to comment.