code: func (cli *Client) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (rc io.ReadCloser, err error) {
  	if err := cli.NewVersionError("1.26", "plugin upgrade"); err != nil {
  		return nil, err
  	}
  	query := url.Values{}
  	if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil {
  		return nil, errors.Wrap(err, "invalid remote reference")
  	}
  	query.Set("remote", options.RemoteRef)
  
  	privileges, err := cli.checkPluginPermissions(ctx, query, options)
  	if err != nil {
  		return nil, err
  	}
  
  	resp, err := cli.tryPluginUpgrade(ctx, query, privileges, name, options.RegistryAuth)
  	if err != nil {
  		return nil, err
  	}
  	return resp.body, nil
  }
docs: // PluginUpgrade upgrades a plugin