code: func (r *request) setWriteOptions(q *WriteOptions) {
  	if q == nil {
  		return
  	}
  	if q.Datacenter != "" {
  		r.params.Set("dc", q.Datacenter)
  	}
  	if q.Token != "" {
  		r.header.Set("X-Consul-Token", q.Token)
  	}
  	if q.RelayFactor != 0 {
  		r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor)))
  	}
  	r.ctx = q.ctx
  }
docs: // setWriteOptions is used to annotate the request with
  // additional write options