Skip to content

Commit

Permalink
Update deprecation comments
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com>
  • Loading branch information
colega and pstibrany committed Jan 12, 2022
1 parent a491840 commit 2934349
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions concurrency/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ func ForEachUser(ctx context.Context, userIDs []string, concurrency int, userFun

// ForEach runs the provided jobFunc for each job up to concurrency concurrent workers.
// The execution breaks on first error encountered.
// Deprecated.
// Use ForEachJob instead.
//
// Deprecated: use ForEachJob instead.
func ForEach(ctx context.Context, jobs []interface{}, concurrency int, jobFunc func(ctx context.Context, job interface{}) error) error {
return ForEachJob(ctx, len(jobs), concurrency, func(ctx context.Context, idx int) error {
return jobFunc(ctx, jobs[idx])
})
}

// CreateJobsFromStrings is an utility to create jobs from an slice of strings.
// Deprecated.
// Will be removed. Not needed when using ForEachJob.
//
// Deprecated: will be removed as it's not needed when using ForEachJob.
func CreateJobsFromStrings(values []string) []interface{} {
jobs := make([]interface{}, len(values))
for i := 0; i < len(values); i++ {
Expand Down

0 comments on commit 2934349

Please sign in to comment.