Difference Between workflow.ExecuteActivity() and workflow.ExecuteActivity() under a workflow.GO()

What is the difference between workflow.ExecuteActivity() and using same inside a workflow.Go block?
From what i know workflow.ExecuteActivity() returns a future so this asynchronous.
And workflow.Go() block will also make activity as asynchronous?

for i := 0; i < 5000; i++ {
		workflow.Go(ctx, func(gCtx workflow.Context) {
			err := workflow.ExecuteActivity(gCtx, "CreateBulkOffers", input).Get(ctx, nil)
			if err != nil {
				// accumulate input records
			}
		})
	}

	// send notification
	for i := 0; i < 500; i++ {
		workflow.ExecuteActivity(ctx, "SendNotification", input)
	}

workflow.Go just adds complexity here without any benefit.

1 Like