code: func (c *Client) checkProtoVersion(protoVersion string) (int, PluginSet, error) {
  	serverVersion, err := strconv.Atoi(protoVersion)
  	if err != nil {
  		return 0, nil, fmt.Errorf("Error parsing protocol version %q: %s", protoVersion, err)
  	}
  
  	// record these for the error message
  	var clientVersions []int
  
  	// all versions, including the legacy ProtocolVersion have been added to
  	// the versions set
  	for version, plugins := range c.config.VersionedPlugins {
  		clientVersions = append(clientVersions, version)
  
  		if serverVersion != version {
  			continue
  		}
  		return version, plugins, nil
  	}
  
  	return 0, nil, fmt.Errorf("Incompatible API version with plugin. "+
  		"Plugin version: %d, Client versions: %d", serverVersion, clientVersions)
  }
docs: // checkProtoVersion returns the negotiated version and PluginSet.
  // This returns an error if the server returned an incompatible protocol
  // version, or an invalid handshake response.