Code review comment for lp:~axwalk/juju-core/lp1260171-stopinstances-ids

Revision history for this message
Dave Cheney (dave-cheney) wrote :

On Wed, May 14, 2014 at 12:37 PM, <email address hidden> wrote:
> LGTM, agree with Dave's comment so would be good to do that before
> landing

Making StopInstance variadic would make some callers initially more verbose, ie

var i []instance.Instance
p.StopInstances(i...) // note variadic expansion to pass the contents
of the slice, not the slice itself.

but, as I found with the change that I made to Addresses recently,
most of the callers that are creating those slices are doing so to
pass one item, so they can be refactored to be variadic themselves and
everything becomes a lot simpler to read without so much tedious
boxing of single values into slices.

« Back to merge proposal