en
en

Question du test Go

En attente de validation

Quelles affirmations sont vraies ? (plusieurs réponses)

func fetch(ctx context.Context, i int) error {
	return fmt.Errorf("error from goroutine %d", i)
}

func main() {
	g, _ := errgroup.WithContext(context.Background())

	for i := range 1000 {
		g.Go(func() error {
			return fetch(context.Background(), i)
		})
	}

	err := g.Wait()
	if err != nil {
		fmt.Println(err)
	}
}
Auteur: John PendenqueStatut : En attente de validationQuestion pas encore passée
0
Évaluations de la communautéPersonne n'a encore évalué cette question, soyez le premier !