code: func addOptions(s string, opt interface{}) (string, error) {
  	v := reflect.ValueOf(opt)
  	if v.Kind() == reflect.Ptr && v.IsNil() {
  		return s, nil
  	}
  
  	u, err := url.Parse(s)
  	if err != nil {
  		return s, err
  	}
  
  	qs, err := query.Values(opt)
  	if err != nil {
  		return s, err
  	}
  
  	// If the url contained one or more query parameters (q) then we need
  	// to do some escaping on these values before Encode() is called.  By
  	// doing so we're ensuring that : and + don't get encoded which means
  	// they'll be passed along to Gerrit as raw ascii. Without this Gerrit
  	// could return 400 Bad Request depending on the query parameters. For
  	// more complete information see this issue on GitHub:
  	//   https://github.com/andygrunwald/go-gerrit/issues/18
  	_, hasQuery := qs["q"]
  	if hasQuery {
  		values := []string{}
  		for _, value := range qs["q"] {
  			for key, replacement := range queryParameterReplacements {
  				value = strings.Replace(value, key, replacement, -1)
  			}
  			values = append(values, value)
  		}
  
  		qs.Del("q")
  		for _, value := range values {
  			qs.Add("q", value)
  		}
  	}
  	encoded := qs.Encode()
  
  	if hasQuery {
  		for key, replacement := range queryParameterReplacements {
  			encoded = strings.Replace(encoded, replacement, key, -1)
  		}
  	}
  
  	u.RawQuery = encoded
  	return u.String(), nil
  }
docs: // addOptions adds the parameters in opt as URL query parameters to s.
  // opt must be a struct whose fields may contain "url" tags.