github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/client/plugin_disable.go (about) 1 package client 2 3 import ( 4 "net/url" 5 6 "github.com/docker/docker/api/types" 7 "golang.org/x/net/context" 8 ) 9 10 // PluginDisable disables a plugin 11 func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { 12 query := url.Values{} 13 if options.Force { 14 query.Set("force", "1") 15 } 16 resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) 17 ensureReaderClosed(resp) 18 return err 19 }