code: func handleAddNode(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (interface{}, error) {
  	c := cmd.(*btcjson.AddNodeCmd)
  
  	addr := normalizeAddress(c.Addr, s.cfg.ChainParams.DefaultPort)
  	var err error
  	switch c.SubCmd {
  	case "add":
  		err = s.cfg.ConnMgr.Connect(addr, true)
  	case "remove":
  		err = s.cfg.ConnMgr.RemoveByAddr(addr)
  	case "onetry":
  		err = s.cfg.ConnMgr.Connect(addr, false)
  	default:
  		return nil, &btcjson.RPCError{
  			Code:    btcjson.ErrRPCInvalidParameter,
  			Message: "invalid subcommand for addnode",
  		}
  	}
  
  	if err != nil {
  		return nil, &btcjson.RPCError{
  			Code:    btcjson.ErrRPCInvalidParameter,
  			Message: err.Error(),
  		}
  	}
  
  	// no data returned unless an error.
  	return nil, nil
  }
docs: // handleAddNode handles addnode commands.