github.com/moby/docker@v26.1.3+incompatible/client/plugin_remove.go (about) 1 package client // import "github.com/docker/docker/client" 2 3 import ( 4 "context" 5 "net/url" 6 7 "github.com/docker/docker/api/types" 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 defer ensureReaderClosed(resp) 19 return err 20 }