github.com/vvnotw/moby@v1.13.1/client/plugin_remove.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  // PluginRemove removes a plugin
    11  func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error {
    12  	query := url.Values{}
    13  	if options.Force {
    14  		query.Set("force", "1")
    15  	}
    16  
    17  	resp, err := cli.delete(ctx, "/plugins/"+name, query, nil)
    18  	ensureReaderClosed(resp)
    19  	return err
    20  }