From b0834a7c15d4c5856a9622906bf38b4f73eac608 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 26 Jan 2022 10:49:11 +0000 Subject: [PATCH] ring: expand documentation of ReplicationSet.Do() Just to be explicit about what is in the return value. Also fix a typo. --- ring/replication_set.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ring/replication_set.go b/ring/replication_set.go index 461429d6f..b73227136 100644 --- a/ring/replication_set.go +++ b/ring/replication_set.go @@ -20,8 +20,9 @@ type ReplicationSet struct { MaxUnavailableZones int } -// Do function f in parallel for all replicas in the set, erroring is we exceed +// Do function f in parallel for all replicas in the set, erroring if we exceed // MaxErrors and returning early otherwise. +// Return a slice of all results from f, or nil if an error occurred. func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(context.Context, *InstanceDesc) (interface{}, error)) ([]interface{}, error) { type instanceResult struct { res interface{}