code: func New(host, user, password string, conf *AdvancedConfig) (c *Client, err error) {
  	// Config
  	if conf != nil {
  		// Check custom config
  		if conf.Port == 0 {
  			conf.Port = defaultPort
  		}
  		if conf.RPCURI == "" {
  			conf.RPCURI = defaultRPCPath
  		}
  		if conf.HTTPTimeout == 0 {
  			conf.HTTPTimeout = defaultTimeout
  		}
  		if conf.UserAgent == "" {
  			conf.UserAgent = defaultUserAgent
  		}
  	} else {
  		// Spawn default config
  		conf = &AdvancedConfig{
  			// HTTPS false by default
  			Port:        defaultPort,
  			RPCURI:      defaultRPCPath,
  			HTTPTimeout: defaultTimeout,
  			UserAgent:   defaultUserAgent,
  		}
  	}
  	// Build & validate URL
  	var scheme string
  	if conf.HTTPS {
  		scheme = "https"
  	} else {
  		scheme = "http"
  	}
  	remoteURL, err := url.Parse(fmt.Sprintf("%s://%s:%d%s", scheme, host, conf.Port, conf.RPCURI))
  	if err != nil {
  		err = fmt.Errorf("can't build a valid URL: %v", err)
  		return
  	}
  	// Initialize & return ready to use client
  	c = &Client{
  		url:       remoteURL.String(),
  		user:      user,
  		password:  password,
  		userAgent: conf.UserAgent,
  		rnd:       rand.New(rand.NewSource(time.Now().Unix())),
  		httpC: &http.Client{
  			Timeout: conf.HTTPTimeout,
  		},
  	}
  	return
  }
docs: // New returns an initialized and ready to use Controller