code: func parseCmd(request *btcjson.Request) *parsedRPCCmd {
  	var parsedCmd parsedRPCCmd
  	parsedCmd.id = request.ID
  	parsedCmd.method = request.Method
  
  	cmd, err := btcjson.UnmarshalCmd(request)
  	if err != nil {
  		// When the error is because the method is not registered,
  		// produce a method not found RPC error.
  		if jerr, ok := err.(btcjson.Error); ok &&
  			jerr.ErrorCode == btcjson.ErrUnregisteredMethod {
  
  			parsedCmd.err = btcjson.ErrRPCMethodNotFound
  			return &parsedCmd
  		}
  
  		// Otherwise, some type of invalid parameters is the
  		// cause, so produce the equivalent RPC error.
  		parsedCmd.err = btcjson.NewRPCError(
  			btcjson.ErrRPCInvalidParams.Code, err.Error())
  		return &parsedCmd
  	}
  
  	parsedCmd.cmd = cmd
  	return &parsedCmd
  }
docs: // parseCmd parses a JSON-RPC request object into known concrete command.  The
  // err field of the returned parsedRPCCmd struct will contain an RPC error that
  // is suitable for use in replies if the command is invalid in some way such as
  // an unregistered command or invalid parameters.