code: func (us Upstreams) ToAPI() []api.Upstream {
  	a := make([]api.Upstream, len(us))
  	for i, u := range us {
  		a[i] = u.ToAPI()
  	}
  	return a
  }
docs: // ToAPI returns the api structs with the same fields. We have duplicates to
  // avoid the api package depending on this one which imports a ton of Consul's
  // core which you don't want if you are just trying to use our client in your
  // app.