code: func normalizeAddress(addr string, useTestNet3, useSimNet, useWallet bool) string {
  	_, _, err := net.SplitHostPort(addr)
  	if err != nil {
  		var defaultPort string
  		switch {
  		case useTestNet3:
  			if useWallet {
  				defaultPort = "18332"
  			} else {
  				defaultPort = "18334"
  			}
  		case useSimNet:
  			if useWallet {
  				defaultPort = "18554"
  			} else {
  				defaultPort = "18556"
  			}
  		default:
  			if useWallet {
  				defaultPort = "8332"
  			} else {
  				defaultPort = "8334"
  			}
  		}
  
  		return net.JoinHostPort(addr, defaultPort)
  	}
  	return addr
  }
docs: // normalizeAddress returns addr with the passed default port appended if
  // there is not already a port specified.